Open a query from a form and pass criteria through (1 Viewer)

MattioMatt

Registered User.
Local time
Today, 07:21
Joined
Apr 25, 2017
Messages
99
Hello all,

I’d like to open a query from a form, and with that query filter the data from a series of combo boxes and text boxes. Either through an existing query or a new query.
Is this possible to do? I’ve been googling it but I’m struggling to find something.
 

Mark_

Longboard on the internet
Local time
Yesterday, 23:21
Joined
Sep 12, 2017
Messages
2,111
Hello all,

I’d like to open a query from a form, and with that query filter the data from a series of combo boxes and text boxes. Either through an existing query or a new query.
Is this possible to do? I’ve been googling it but I’m struggling to find something.

From the description, this would be a form in datasheet mode. You would have a lot of options for ordering and filtering data.

If you use just a query you will still have sorting and filtering abilities, but you won't have direct control over what users decide to enter into the query.

If you are not sure what I am referring to, open your query and right click on the heading.
 

MattioMatt

Registered User.
Local time
Today, 07:21
Joined
Apr 25, 2017
Messages
99
I’m looking to open the query in a new window and this query won’t have any relation to the form. So my form uses another query. I don’t want to change the query on the form but open a query that is based on filters from the form.
 

Mark_

Longboard on the internet
Local time
Yesterday, 23:21
Joined
Sep 12, 2017
Messages
2,111
If your form has no relation to the query, how will you use you "open a query that is based on filters from the form"?

Can you be a little more clear on what you are trying to do? Will they both be driven from the same table? Is the form looking up filters for the query? Something else?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:21
Joined
Feb 19, 2002
Messages
43,484
Users should NEVER be given access to queries or tables. They should only interact with forms and reports. If you are using the full version of Access, the form in DS view will have the same filtering options available as would a query without the risk. If you want to use custom filters on the form, use an unbound form with a subform in DS view.
 

Users who are viewing this thread

Top Bottom