G
Guest
Simple question but I'm getting fustrated.
I just want to open a query that shows only records for value entered into
text box.
Could someone show me what to add to this code to make it specify only the
records for value entered into txtName.
Private Sub cmdView_Click()
Dim stLinkCriteria As String
If IsNull(Me.txtName) Then
stLinkCriteria = stLinkCriteria & " and [Name]=" & "'" & Me.txtName & "'"
End If
DoCmd.OpenQuery "q_NameQuery"
End Sub
I just want to open a query that shows only records for value entered into
text box.
Could someone show me what to add to this code to make it specify only the
records for value entered into txtName.
Private Sub cmdView_Click()
Dim stLinkCriteria As String
If IsNull(Me.txtName) Then
stLinkCriteria = stLinkCriteria & " and [Name]=" & "'" & Me.txtName & "'"
End If
DoCmd.OpenQuery "q_NameQuery"
End Sub