Pass selection from form to filter repot - Help for novice.

kfrankham

New member
Local time
Today, 20:13
Joined
Jul 2, 2009
Messages
1
Pass selection from form to filter report - Help for novice.

Good afternoon all,

I have just come across AWF while searching the net for help with access 2007 database. Great site btw!

I have the following problem which I need to resolve quite urgently, but I dont have a clue where to start.

Here is my problem;

I am trying to create a report based on users selection from a form and finding it quite difficult.

Here's where I am at so far;

I have a table called incidents. User enters new incidents via 'incidents' form. I have a report which lists all incidents with columns for;

Incident Type
Incident Date
Persons name
Day of week
Action taken

I know that access 2007 has report view which enables the user to filter the report by right clicking a column and selecting a filter criteria but i need it to be more user friendly than that.

I would like there to be a form called 'reports' where the user can select any of the following filter criteria from combo boxes;

Incident type (Choose from available incident types in table 'incidents')
Incident date (2 combo boxes to select from and to dates)
Persons name (Choose from available persons in table 'incidents')
Day of week (Choose from available day of week in table 'incidents')
Action taken (Choose from available action taken status in table incidents)

Once desired filters are selected, the form needs a contol button to pass the selections through to a report and generate the report based on the users selections.

e.g

The user may want to view 'serious incidents' between 01/03/2009 and 20/06/2009 involving 'Jon smith'.

I want the report to output all incidents that match the filter criteria above.

I have no vba knowledge at all (not even sure if i need it or not) I am a total beginner so any advice is very much apreciated.

Thanks in advance

Karl
 
Last edited:
kfrankham,

This type of filtering will take the creation of about 5 combo boxes. Starting with one for the Incident Type. Then one for the Incident Data. This combo box would be filtered to show with each having its contents filtered by the selection from the Incident Type combo box to show only those Indidents that exist for records of the selected Incident Type. This type of filtering would need to be done for all of the other items in your list.

Also, to implement the actual filtering I would suggest that with the amount of possible selections that you have, you would need use VBA to create a custom function that would create an SQL statement (query) based on the selections made.

While this is not over the top complicated, it is not just a snap either. I will require quite a bit of work.

I don't want to discourage you, but I don't want to leave you thinking that just anyone can create this type of custom filtering.

Post back your questions.
 

Users who are viewing this thread

Back
Top Bottom