Toggling to a form

  • Thread starter Thread starter Gee
  • Start date Start date
G

Gee

I have 2 forms with mostly the same records. I need to be
able to click a button and have the db open the #2 form in
the same record that the #1 form is currently on. I have
made a button to open the #2 form, but how do I get it to
go to the right record? My key is Unique ID.
I had a suggestion of:

stLinkCriteria = "[Unique ID] = " & Me![Unique
ID] '*****
DoCmd.OpenForm stDocName, , stLinkCriteria

But that didn't work...it sent me to a blank form.
Help?
Thank you in advance for any help!

This is the code:

Private Sub Command328_Click()
On Error GoTo Err_Command328_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Steps MISC Form"
DoCmd.OpenForm stDocName, , stLinkCriteria


Exit_Command328_Click:
Exit Sub

Err_Command328_Click:
MsgBox Err.Description
Resume Exit_Command328_Click

End Sub
 
Never mind...I got it...I was entering the suggestion
wrong...Thanks "Graham R Seach", you were right.
 
Back
Top