create forward and back button to use forms and only see form you are looking at

davetough
davetough used Ask the Experts™
on
Hello,
Lets see if I can ask this question:
I have created about 20 forms in microsoft access. Each form is simple and has text box for user to write in correct word for picture I have put on form. I use if statement to tell them if they are correct or not.

I want to have at the bottom of forms a forward and back command buttons- to go to next form or go back to previous form. I have created a forward button - but when I click it - I still have first form behind the form I have navigated to. Is there a way to make form invisible i am leaving?
is there a way to go back to previous form? and then have present form invisible?

Mainly I just want user to see one form at a time.

thank yoiu
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2013
Commented:
Hi davetough,
To hide the current form, try me.form.visible = false

In the openform statement, pass the name of the form you are currently on to the new form through the openargs parameter:

Docmd.openform "SomeForm",,,,,,me.name

Then in the "Back button", unhide the previous form:

Forms(openargs).form.visible = true

Most Valuable Expert 2012
Top Expert 2013

Commented:
Glad to help out :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial