M
maindaco via AccessMonster.com
I have Form1 bounded to a table (with fields: BDate, Name, LastName, City,
Street), then I created another form SearchForm, intended to search and look
up for specifics fields on Form1. I'm using the following statements to
filter 1 criteria (LastName):
Private Sub SearchCommand23_Click()
On Error GoTo Err_SearchCommand23_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form1"
stLinkCriteria = "[LName]=" & Me![LastName]
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_SearchCommand23_Click:
Exit Sub
Err_SearchCommand23_Click:
MsgBox Err.Description
Resume Exit_SearchCommand23_Click
End Sub
Questions: Is it possible to set the stLinkCriteria in order to make a
combined search (using 2 or more criteria like City and/or Street)?...What
would be the code to be added to a button, in order to "clean" the filter on
Form1?
Your responses will be really appreciated. Thanks.
Street), then I created another form SearchForm, intended to search and look
up for specifics fields on Form1. I'm using the following statements to
filter 1 criteria (LastName):
Private Sub SearchCommand23_Click()
On Error GoTo Err_SearchCommand23_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form1"
stLinkCriteria = "[LName]=" & Me![LastName]
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_SearchCommand23_Click:
Exit Sub
Err_SearchCommand23_Click:
MsgBox Err.Description
Resume Exit_SearchCommand23_Click
End Sub
Questions: Is it possible to set the stLinkCriteria in order to make a
combined search (using 2 or more criteria like City and/or Street)?...What
would be the code to be added to a button, in order to "clean" the filter on
Form1?
Your responses will be really appreciated. Thanks.