Public Variable

G

Guest

I have encountered an interesting issue that I have no idea how to fix. I
have a form that has a button to launch a report based on the current record
that is being pointed to. The report runs from a query that is filtered to
that specific record number - the code declares a public variable, sets the
variable to be empty when the form opens and then sets the variable = to the
record info needed for the query to filter. Runs perfectly fine on my
desktop but I can't get it to run on my laptop...I keep getting a dialog box
to enter a parameter. Both systems are using Access 2003. The desktop is
running xp home and the laptop is running xp pro....is there something
blocking the public variable from being passed to the query? Also, if you
know, I want to put the username needed to link to the external tables in the
mde file. I entered it in the command line options but when I made the mde
file it didn't keep it, so when I launch the program it always asks for the
user name...not a huge deal but would prefer not to have to do that. Anyone
have any insight to the two issues?
 
G

Guest

Avoid using public variables, for starters.

There is a better technique to filter a report than the one you are using.
If you look at the Help topic for the OpenReport method, you will see a Where
arguement. Use that to do your report filtering.
 

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