Viewing the same record whilst switching between forms

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I have a problem in my database, I have various forms
which all have the same Primary Key (RUN NUMBER)but
various data which needs to be viewed. I have a lot of
records in this database, currently when I 'OPEN' another
form using the Command button macro I have designed, the
form opens at record number 1.

I need to be able to switch between forms to view the
same record in each form but do not want to go to the
hassle of finding records each time I do it. Is there
something I can add to the command button 'OPEN' macro
that will open the form at the same record as that which
I have been viewing? Or am I missing something obvious.

In lotus Approach, I had the same database with switching
views and it kept the record number the same
automatically, people have already commented about the
constant need to check that they are on the correct
record.

Thanks


Craig.
 
Your code for your command button that opens the second
form should look similar to this.

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "form name"
stLinkCriteria = "[Record ID]=" & "'" & Me![Record ID]
& "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Jim
 
Back
Top