Parameter Query & Public Variables?

G

Guest

I have a report being generated off a parameter query, but I have the
parameter reference a date on a form so the criteria line under a field named
"datDate" reads [Forms]![frmLogID].[datDate]. This allows the user to
generate a report via a command button after entering his daily data.
I presented the database to the user and he asked to have a way to view past
reports by selecting dates.
I could have him work his way through the data enry form that is referenced
by the query, or I could in effect make a copy of the report query and change
the reference to a new form that will have a dropdown list of available
report dates. (I've actually done this, but it seems terribly inefficient. I
now have a query and a report that are identical to the originals with the
exception of the form reference.)
My question: is there a way to have a query criteria reference something
like a public variable and then have that variable be set by the users from
different forms.
Thanks,
E.Q.
 
D

Douglas J. Steele

You can't use a public variable, but you can create a public function that
returns the value of the public variable, and use that public function.
 

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