Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter

Status
Not open for further replies.

thegameoflife

Programmer
Dec 5, 2001
206
US
I'm trying to pass the value of x to the filter, with no luck at all.

Code:
Private Sub Form_Load()

    Dim X As String
    
    X = Me.OpenArgs
    
    Me.Filter = "[Cust Number]= X"
    Me.FilterOn = True

End Sub
 
Try the following:

Private Sub Form_Load()

Dim X As String

X = Me.OpenArgs

Me.Filter = "[Cust Number]= '" & X & "'"
Me.FilterOn = True

End Sub

You seem to be missing the quotes around the string.


Cheers,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top