Variable Record Source

G

Guest

Hello. I have Two queries, that are excatly equal, the only thing that
changes is one criteria. Imagine Querie1 and Querie2. Querie2 is a copy of
Querie1, plus one else criteria. I already have a report that for Querie1. I
can make a copy form report1 and then I change the Record Source to Querie2.
But is there any way to tell the report preciously what record source should
e gets?

Regards in advance,
Marco
 
G

Guest

I generally try to avoid creating multiple queries where the only difference
is the criteria. However, you can add code to the On Open event of a report
that sets the Record Source for the report.
 
G

Guest

Hi. How? Could you give an example.

I gave an idea. How can I send a criteria directly from a form? Imagine that
the criteria is in blank, and when I tried to execute the query, I insert the
criteria at that point.

Is it possible?

Regards,
Marco
 
G

Guest

This has been answered many times. Search at www.Groups.Google.com for
"strWhere = strWhere" group:*.Access.Reports* author:hookom
If you can't find an applicable solution, come back with some specifics of
your needs.
 

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