Form Filter by default

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I currently have forms for my employee and client information run directly off the respective tables.

Is there a way to have the default set in such a way that when the form loads, the form automatically filters to Active employees and clients. There is a status field. and if someone wanted to see all records, ie past or present employees etc all that they would have to do is click the funnel to remove the filter?

I've played around with no success, must not be playing on the right playground.
 
Certainly. Create a query with "active" as the criteria. Use the query as
the record source of the form.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

René said:
I currently have forms for my employee and client information run directly off the respective tables.

Is there a way to have the default set in such a way that when the form
loads, the form automatically filters to Active employees and clients.
There is a status field. and if someone wanted to see all records, ie past
or present employees etc all that they would have to do is click the funnel
to remove the filter?
 
René said:
I currently have forms for my employee and client information run
directly off the respective tables.

Is there a way to have the default set in such a way that when the form
loads, the form automatically filters to Active employees and clients.
There is a status field. and if someone wanted to see all records, ie
past or present employees etc all that they would have to do is click
the funnel to remove the filter?

I've played around with no success, must not be playing on the right playground.

Code the Form's Open event:
Me.Filter = "Status = True"
Me.FilterOn = True

The above assumes status is a Check Box (True/False), and True
represents Active.

If Status is Text then use
Me.Filter = "Status = 'Active'"

Notice the use of single quotes around Active.
 
Back
Top