Access Report Problem

Hi all

i have an issue with an access report when it is run with a criteria field of a persons first name, it works fine the first time, but when i try to run the report the second time it does not give me the option to enter another name, but returns the first reports data, the only way i can "reset" it is to close access and re open the database

access 2007/2010

Any ideas what could be happening

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
how are you entering the criteria? Would you please post the code you are using to process opening the report and tell us how you are running it? thank you
It sounds you like the report is still open from the first time.  Do you close the report before you run it again or is it just hidden?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
techsolve1Author Commented:
Hi Ron

ahh it seems the report is hidden, the exit button on the report opens the main form, but doesnt close the report, how can i setup the exit button to close the report?

Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
if the code is behind the report:
docmd.close acReport,, false

Open in new window

close and don't save
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
be sure to close the report LAST in your code because once it closes, it won't execute anything else
Crystal, are you sure about that?  I just did a quick test by adding a button to close the report and a Message box on the next line after the Close command.  The message still came up when I clicked on the close button.

crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
Hi Ron,

Could be due to look-ahead processing ... but that is not something I would count on ...
Jeffrey CoachmanMIS LiasonCommented:

How about you just post the complete code you are using...
or better yet, a small sample database.

We are all just guessing here without any context....
techsolve1Author Commented:
Hi all

the report was still running, it was using a macro to open the main menu form and not an event procedure to close the form once run, i have used crystal code snippet to close the form and works, thanks all for the input
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.