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
techsolve1Asked:
Who is Participating?
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
0
IrogSintaCommented:
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?

Ron
0

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?

thanks
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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

Open in new window

close and don't save
0
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
0
IrogSintaCommented:
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.

Ron
0
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 ...
0
Jeffrey CoachmanMIS LiasonCommented:
techsolve1,

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

We are all just guessing here without any context....
0
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
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.