Synchronizing two forms

  • Thread starter Thread starter Steve Crowhurst
  • Start date Start date
S

Steve Crowhurst

Can some kind soul help with the following problem?

I want to synchronize two forms. frmInitial has a command
button and when clicked I want frmPrimarySub to open and
be synchronized with frmInitial, frmPrimarySub will also
be used for adding new records on occassions. thank you
all for the time and effort to read this. Have a good day.
 
Steven,

In the Click event of your command button, add the following:

' If you want to link the two forms on a LastName value
Dim strWhere as String
strWhere = "LastName = " & chr(34) & Me!LastName & chr(34)
DoCmd.OpenForm "frmPrimarySub", , , strWhere


' If you want to link the two forms on a Number value
Dim strWhere as String
strWhere = "EmployeeID = " & Me!EmpID
DoCmd.OpenForm "frmPrimarySub", , , strWhere

hth,
 
Back
Top