hi all,
I have read trough the articles inthe forum re multiple filters and cannot seem to see what Im doing wrong, its so frustrating, Ive been staring at it for over an hour.
basically I need to filter on a STAFF ID and a LEAVE TYPE, and Im suing the following code:-
ab = Me![Staff Number]
ac = Me![Leave Type]
DoCmd.ApplyFilter , "[Staff Number]='" & ab & "' And [Leave Type] = '" & ac & "'"
Me.FilterOn = True
when I run this I get a "The Apply filter was Cancelled. Could any please have a look at the above code and advise me what Im doing wrong.
many thanks
James
I have read trough the articles inthe forum re multiple filters and cannot seem to see what Im doing wrong, its so frustrating, Ive been staring at it for over an hour.
basically I need to filter on a STAFF ID and a LEAVE TYPE, and Im suing the following code:-
ab = Me![Staff Number]
ac = Me![Leave Type]
DoCmd.ApplyFilter , "[Staff Number]='" & ab & "' And [Leave Type] = '" & ac & "'"
Me.FilterOn = True
when I run this I get a "The Apply filter was Cancelled. Could any please have a look at the above code and advise me what Im doing wrong.
many thanks
James