G
Guest
I have a form A where it assignes an ID whenever I start a new entry. I put a
command button to open a new Form B where the ID in Form A is the common
field for both forms. My form B however doesn't link properly and nothing of
my entries from form A will show in Form B.
My code looks like this:
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_QuoteDetails"
stLinkCriteria = "[OrderInfoID]=" & Me![OrderInfoID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdNext_Click:
Exit Sub
Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click
End Sub
Please Advise.
Thanks in advance
Travis
command button to open a new Form B where the ID in Form A is the common
field for both forms. My form B however doesn't link properly and nothing of
my entries from form A will show in Form B.
My code looks like this:
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_QuoteDetails"
stLinkCriteria = "[OrderInfoID]=" & Me![OrderInfoID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdNext_Click:
Exit Sub
Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click
End Sub
Please Advise.
Thanks in advance
Travis