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

Filtering for all records 1

Status
Not open for further replies.

BrentJ

Technical User
Aug 2, 2004
29
0
0
US
I have users "login" using a username and password for their section, which then filters all records for their section. I want to have a "master" account which has access to all records, but without removing the filters entirely I can't get it to pull all records. Is there a way to filter for all records, maybe using a wildcard? Or maybe a way to temporarily disable filters without removing them? Thanks in advance.

Brent
 
If you remove your filter (which we don't know how you set), you should see all the records.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
As dhhookom said, it depends how you are filtering the records.

If doing via the query you can set the parameter to 'Like *' which picks up everything.

If via the report itself set the Filter On property to False ie me.filteron = false within On Open Event, or empty the Filter property ie me.filter = "".
 
I tried using the Like * but I could not get it to work. I also tried using setvalue in a macro to set FilterOn to No, but it would not let me use setvalue for that property. I am open to either so long as I can apply and remove the filter based on a criteria. The criteria I am trying to use is for the [Platoon] column and is as follows:

IIf([Forms]![PlatoonSelect]![Platoon]<>"DAMC", [Forms]![PlatoonSelect]![Platoon], Like "*")

Access always changes it to ([SoldierData].[Platoon]) Like "*"
and still filters.

The goal is to apply a filter using [Platoon] as the criteria (which I have done) but not to filter if [Platoon] = "DAMC"

Any help would be greatly appreciated. Thanks.


 
You can't place a "Like" into an expression like this. Try:
Code:
IIf([Forms]![PlatoonSelect]![Platoon]<>"DAMC", [Forms]![PlatoonSelect]![Platoon], [SoldierData].[Platoon])
This assumes you are filtering against [SoldierData].[Platoon] in your query.


Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
You are a genius! Thanks. I was on the verge of duplicating everything without a filter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top