Link to home
Create AccountLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

MS Access 2003 VBA Filter

My following COde works...
I'm getting some errors when I try and add an addional filter for timeSheetID

I can pass it in fine...but proper syntax for second =?

Public Sub loadData(htid)
    'Load combobox with default data
    loadCombo
    
    'Apply data filter after resetting to false forst to clear any residual data
    Me.FilterOn = False
    Me.Filter = "hoursTrackingID = '" & htid & "'"
    Me.FilterOn = True
    
    'This is required for new record inserts
    Me.txtHoursTrackingID.DefaultValue = htid
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of Larry Brister

ASKER

Great answers guys!