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

Query based on critera check boxes

Status
Not open for further replies.

DiTab1

Technical User
Feb 9, 2005
5
US
Hi again! I am sooo glad I found this site! Everyone here has been so helpful.

Here is my question of the day:

I have a form [Main] with multiple check boxes [Benefits], [Claims], [Other]

I would like to run a query that will ask the user to enter the Call Type and then show only the info where the type of call selected (Benefits, Claims, Other) is True.

Any help would be appreciated!

Thanks!
Di
 
Could you share:
Actual form and control names
Actual table and field names

I expect your table may not be normalized but I will withhold judgement.

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]
 
I provided all that info in the original message.

My form is actually called Main
The controls are check boxes named Claims, Benefits, Other

My Table is also called Main (really original, I know). The fields on the table are also named Claims, Benefits, Other.

I can run queries to pull info to reports that will show me calls by caller, by date, by Supervisor, etc. I can also run a query to run a report that just shows me Benefits calls or just Claims calls. The problem is that I would like to make this just one query where the user could actually select which call type they want the report for instead of making a different report/query for each call type.

Also, I am trying to research this but I can't figure out how to may my report total the number of records matching the criteria. I can get it to find all the calls that John Smith (Field Name: Caller) took but not to tell me at the end of the report how MANY calls that was.

Thanks so much for your assistance. I am self taught on what I do know about Access and am learning new things on this site every day.
 
SELECT ...
WHERE (
([Enter Call Type] Like 'B*' And Benefits)
Or ([Enter Call Type] Like 'C*' And Claims)
Or ([Enter Call Type] Like 'O*' And Other)
) ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
As I suspected, your table is not normalized. You should not have call types as field names. I would expect a table for individual calls with a primary key like CallID. You could then create a related/child table, tblCallTypes with fields like:
CallTypeID autonumber primary key
CallID link to CallID in calls table
CallType for a single value like Claims or Benefits
CallComments?
You would also need a table of CallTypes with each record being one call type.

This allows you to more easily query your call tables. You also can add additional call types without changing table structures, forms, reports, queries,...

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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top