filter

peterbowles

Registered User.
Local time
Today, 21:12
Joined
Oct 11, 2002
Messages
163
I am trying to open a form like this

Dim filter As String

filter = [EmployeeNo] = vNum

* vNum is a global Variable which hold the employee number when the user signs in

DoCmd.OpenForm "frmInvoiceLines", , filter

does not work

Any help would be great thanks
 
Filter probably isn't the best variable name to make as it is an object property in Access and, therefore, reserved.

strFilter would be more appropriate.


Code:
Dim strFilter As String 

strFilter = "[EmployeeNo] = " & vNum

DoCmd.OpenForm "frmInvoiceLines", acNormal, , strFilter
 

Users who are viewing this thread

Back
Top Bottom