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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Filter

Status
Not open for further replies.

rry2k

Programmer
Jun 28, 2001
678
US
I'm trying to set a filter on a form at runtime. I tried using Me.Filter = "EmployeeID = 4" but it displays all records. After I get this test to work I'll need to set the filter to a value selected in a dropdown.

Thanks for the help..Russ
 
Me.Filter = "EmployeeID = 4"
Me.FilterOn = True

'to turn off:
Me.FilterOn = False

'to clear filter:
Me.Filter = "" "The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
My filter seems close but I still have a bug.
When I use: Me.Filter = "[time card hours].EmployeeID = [Time Card Hours1].EmployeeID" It prompts me with a parm box asking for the [Time Card Hours1].EmployeeID. This is filled in as a result of a combobox selection that it's bound to.

I'm lost ..Thanks for the help..Russ
 
Your Code Me.filter = "[time card hours].EmployeeID is wrong you should also have square brackets around EmployeeID that is why you get the parm box
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top