Changing Criteria in Access Queries

D

dlunn01

Folks,

Hello. I am have just started looking at writing VBA but having my
challenges, please excuse me.

Here is my problem. I am running four queries where I am having to manually
input the criteria to generate the output to Excel - individual reports. I
have 70+ people to do this to. Is there an easy want to either through
macro's or VBA, look at a table that I have, input the name into each of the
four queries and generate the query to an Excel. The other option is to
build four queries per name.

Thanks in advance,

Dale
 
K

KARL DEWEY

Use a form to interface with the query criteria. The form can have textbox
to enter or combo to pick from. You could also have a subform that has list
with checkbox to select or not select (Yes/No field with other list item).

Reference the form's object in the criteria like this --
[Forms]![YourFormName]![ObjectName]

A subform reference would be ---
[Forms]![YourFormName]![YourSubformName]![ObjectName]

Then place a command button on the form to run the report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top