Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving between forms with link criteria 2

Status
Not open for further replies.

doover

MIS
Aug 8, 2003
5
US
When working with forms in MS Access 97, which is the best way to move between forms keeping the same primary key field constant.

For example..

In questionnaire database, the question answers (Yes/No) are stored in fields q1-q20. Each physical answer sheet is stored on one record with Primary Key "Customer Number". Each customer should fill out a questionnaire.
The questions are held on forms. 4 in total, with 5 questions on each and as each form is finished, the user needs to click next to go to the next page - - hence keeping the customer number the same (this would keep the same record which then fills in the next 5 answers).

I have used the Microsoft Access Button Wizard, which sets link criteria and filters out what isnt being used, but after some time pulls up a run time error 2501.

Can anyone help me?

Doov
 
This may not be the best way of doing things, but it works...

Instead of haveing 4 forms, put them all on one form but use a Tab Control, with 5 questions on each tab. Put a button on each tab with the code:

DoCmd.GoToControl "NameOfControlOfFirstQuestionOnNextPage"

Similarly, you could add a "back" button. If You only wanted to display the current tab, you could add the code:

Me!NextTabName.Visible = True
Me!OldTabName.Visible = False

This way you never move off the current record.
Hope this helps.

GT
 
Cheers!

Just what i was looking for!

The tabs may be useful however... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top