S
Scott B
Greetings,
The following code worked fine when the form had a text box, but when I
changed it to a combo box, it now does not return any records. What did I
miss?
-------
Private Sub cmdChooseGuest_Click()
On Error GoTo Err_cmdChooseGuest_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmGuestRecord"
stLinkCriteria = "[FirstName]=" & "'" & Me![FirstName] & "'"
stLinkCriteria = "[LastName]=" & "'" & Me![LastName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdChooseGuest_Click:
Exit Sub
Err_cmdChooseGuest_Click:
MsgBox Err.Description
Resume Exit_cmdChooseGuest_Click
End Sub
The following code worked fine when the form had a text box, but when I
changed it to a combo box, it now does not return any records. What did I
miss?
-------
Private Sub cmdChooseGuest_Click()
On Error GoTo Err_cmdChooseGuest_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmGuestRecord"
stLinkCriteria = "[FirstName]=" & "'" & Me![FirstName] & "'"
stLinkCriteria = "[LastName]=" & "'" & Me![LastName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdChooseGuest_Click:
Exit Sub
Err_cmdChooseGuest_Click:
MsgBox Err.Description
Resume Exit_cmdChooseGuest_Click
End Sub