Form that runs queries based on depressed (not sad) buttons

  • Thread starter Thread starter Derek Wittman
  • Start date Start date
D

Derek Wittman

I have a simple database (4 real tables) that I would like
to create a query on. My goal is this - to create a form
that, when options (buttons?) are selected, these options
are considered for criteria. When the GO button is
clicked, the criteria are used in either OR or AND,
depending on the need of the user. Basically, I want this
to be a seamless approach for Joe User to be able to run
queries without having to set them up.

For example, Joe can depress a Candy button, and a
Selection button, then click GO and the "desc" field in
the 'behind-the-scenes' query will be

(Like *Candy* or Like *Repack*)and Like *Selection*

If I understand correctly, I need to pass the criteria
through a Macro, which will execute the query WITH the
criteria selected. Can someone help? (I have NO VBA
programming, but a little SQL)
 
I realize I am replying to my own post. Rather than button presses, I've elected option (radio) buttons for my selections within an option group. So, I want to run a query based on the option button pressed determining the query critera (including wildcards as mentioned below). I hope this adds to the clarification, and not the opposite.

Thank you!


----- Derek Wittman wrote: -----

I have a simple database (4 real tables) that I would like
to create a query on. My goal is this - to create a form
that, when options (buttons?) are selected, these options
are considered for criteria. When the GO button is
clicked, the criteria are used in either OR or AND,
depending on the need of the user. Basically, I want this
to be a seamless approach for Joe User to be able to run
queries without having to set them up.

For example, Joe can depress a Candy button, and a
Selection button, then click GO and the "desc" field in
the 'behind-the-scenes' query will be

(Like *Candy* or Like *Repack*)and Like *Selection*

If I understand correctly, I need to pass the criteria
through a Macro, which will execute the query WITH the
criteria selected. Can someone help? (I have NO VBA
programming, but a little SQL)
 
Back
Top