Access 2003
Win XP - Win 7
I need to open the form "frmPeopleList" filtering the field "Position" to only those with values of "Staff".
From a button with this code:
Code:
Private Sub cmdFilter2_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPeopleList"
stLinkCriteria = "[Position]=" & "Staff"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
the above code seems to work but with a parameter box popping up prompting you to type "Staff"
I am assuming the following line of code needs some tweaking:
Code:
stLinkCriteria = "[Position]=" & "Staff"
tia
ducecoop