G
Guest
Hello,
I am using Access 2002. I have a form that I created for the users to enter
two parameters that will open another form.
Here are my steps:
1) I created the Parameter form with both parameters(filters).
2) I added a command button using the wizard.
3) The wizard only seems to let me choose one of the two fields to filter.
4) I looked at the VB code and here is what I saw:
Dim stLinkCriteria As String
stDocName = "Pick List C"
stLinkCriteria = "[Pref List ID]=" & Me![Text2]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command6_Click:
Exit Sub
5) I think I want to add the follwing LinkCriteria:
stLinkCriteria = "[Facility]=" & Me![Text0]
6) I am trying to add it as follows:
stLinkCriteria = "[Pref List ID]=" & Me![Text2] AND
stLinkCriteria = "[Facility]=" & Me![Text0]
DoCmd.OpenForm stDocName, , , stLinkCriteria
However, I do not know the proper (or any) syntax in VB.
Can someone please help?
1) Am I using the correct method?
2) What is the proper syntax?
Thanks in Advance
Jeff
I am using Access 2002. I have a form that I created for the users to enter
two parameters that will open another form.
Here are my steps:
1) I created the Parameter form with both parameters(filters).
2) I added a command button using the wizard.
3) The wizard only seems to let me choose one of the two fields to filter.
4) I looked at the VB code and here is what I saw:
Dim stLinkCriteria As String
stDocName = "Pick List C"
stLinkCriteria = "[Pref List ID]=" & Me![Text2]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command6_Click:
Exit Sub
5) I think I want to add the follwing LinkCriteria:
stLinkCriteria = "[Facility]=" & Me![Text0]
6) I am trying to add it as follows:
stLinkCriteria = "[Pref List ID]=" & Me![Text2] AND
stLinkCriteria = "[Facility]=" & Me![Text0]
DoCmd.OpenForm stDocName, , , stLinkCriteria
However, I do not know the proper (or any) syntax in VB.
Can someone please help?
1) Am I using the correct method?
2) What is the proper syntax?
Thanks in Advance
Jeff