Help - using buttons to act as query criteria

Charlottew14

Registered User.
Local time
Today, 20:50
Joined
Oct 4, 2012
Messages
32
This is a bit complicated, and I'm a novice so bear with me please....

I have a database, which is essentially based around one big table with lots of data in.

I have several queries/forms relating to this data, pulling off bits where needed.

The field in my main table are Country, Type, Name, Assigned and Website.

There are 4 countries and 45 different types, and I need a query (which will later be used as a subform) for each different type.

There will be another form, with a button to access each of these 45 different types.

Instead of having 45 separate queries, with 45 separate subforms, is there any way I can just use one -pulling the 'type' criteria from the button pressed?! I don't want another box to pop up to select the parameter, I just want to be able to press the button and have that change the criteria in the query.

Is this possible? And if so, is it really complicated? I'm quite new to access!

Any help is much appreciated.
 
It is absolutely possible to do it.. What you need is to generate Queries Dynamically.. There are several examples scattered over the internet.. Try googling Dynamic Queries, Queries on the Fly, QueryDef VBA.. etc..
 

Users who are viewing this thread

Back
Top Bottom