Use Multiple Forms for Same Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a really stupid question I can't seem to figure out. Searches were
no help, but hopefully someone can point me in the right direction.

I have a form that displays the results of a user-defined query. The
RecordSource is that query. Or it could be a table, doesn't really matter.
I have one form to display the most important information to the user. I
then have links to two other forms I've created to display some secondary
information (all from the same record in the query/table).

My issue is, I don't know how to link the tables together.

So in the main page, I might go to record 75 of 100. Then I want to view
the secondary information on that record, I click on the button and it shows
the data from record 75. Right now, it goes to record 1 of 100 from the
query.

Then I would like to have it so that the user could scroll through all the
secondary data records, so I might go to record 56 of 100. Then I want to
view the main information, so I click on a button to show/return to the main
page, and it's now showing record 56 of 100. (Right now it still shows 75).

I feel like this should be really easy and I just don't see how to do it.
Any help is appreciated.

Thanks,
Jay
 
Forgot to add some information that may (or may not) help.

- I'm using Access 97.
- This is for data viewing ONLY. No data entry will occurr.

Jay
 
My issue is, I don't know how to link the tables together.

So in the main page, I might go to record 75 of 100. Then I want to view
the secondary information on that record, I click on the button and it
shows
the data from record 75. Right now, it goes to record 1 of 100 from the
query.

You would be best to simply code the 2nd form to open to the record you
want...

me.Refresh ' always write to disk when launching another form

docmd.openform "form2",,,"id = " & me!id

(we assume that you have a autonumber primary key called id..which is the
default).

So, the above is only two lines of code. I would suggest that you set the
form's model property to yes (in the other tab) for the 2nd form.

The user can then view, or event edit the data in this form. The user will
then close the form, and return back to the main form
(with the model setting, the user will have to do that...and this also
eliminates code to "move" the original form, since we can't move around in
the 2nd form.

The above is thus clean, only two lines of code, and eliminates any, and all
problems of trying to make both forms move together.

Try the above approach....

You *can* code things to move both forms togegher, but it more work then the
above simple solution...
 
Back
Top