Synchronizing two forms

  • Thread starter Steve Crowhurst
  • 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.
 
C

Cheryl Fischer

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top