Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronized Linked Forms

Status
Not open for further replies.

gimmyd

Technical User
Apr 12, 2002
36
US
My Customer form opens the Experiment form with a button and they are linked by the CustomerID field present in both. I've written the following code in a form called Experiment's OnCurrent event to keep it synchronized with the Customer form while the customer Form is being incremented from one record to another. However, it is not doing so. It only synchronizes by clicking the open Experiment button again. What am I missing?

Dim strForm As String
Dim strWhere As String
strForm = "Experiment"
strWhere = "CustomerID = Forms!Customers!CustomerID"
If IsLoaded(strForm) Then
DoCmd.OpenForm FormName:=strForm, wherecondition:=strWhere
End If

Thanks
 
I must have been "code blind." I put the right code in the wrong form's OnCurrent event. All is well now!
 
I think you have to requery one of the forms ...

Forms!formname.Requery

or me.requery

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top