Avdancing all Sub forms with NEXT Click

music_al

Registered User.
Local time
Today, 19:01
Joined
Nov 23, 2007
Messages
200
I have 2 tables in my database, a Main table (Patient) and a Sub Table (Appointment).

I've created several forms based on the Appointment table, all including the Primary Key but each form displaying different fields. See below...

Appointment Sub Form1
Appointment_ID
Date
Venue
Nurse
etc

Appointment Sub Form2
Appointment_ID
Diagnosis
Prescription
etc

I've put each Sub Form on separate pages of a tab control. The problem I have is, when I advance through the records of Sub Form1, Sub Form2 does not advance in sync with it. How can I make this happen?

I think maybe using code to force each form to go to the next, previous, first, last or new record would be the answer. Im not sure of what syntax to use to call the other Form Names in each form.

Thanks in advance

Al
 
I would link the two sub forms together using the Master/Linking field in the second sub form. Then Master linking field will reference a control on the first sub form.

In the First sub form's On current event, you will need to requery the second sub form to keep them in sync.
 
Hi Coach

Thanks for this.

I thought the Master/Linking linked my Sub Form to the Parent Form , which in my case is the Patient Form.

Are you saying I link
Sub Form2 to Sub Form1,
Sub Form3 to Sub Form1 (or do I link that to Sub Form2)

Also, how do I requery a Sub Form ?

Thanks in advance

Al
 

Users who are viewing this thread

Back
Top Bottom