Question about tab controls, subforms and master/child fields (1 Viewer)

dkmoreland

Registered User.
Local time
Today, 12:18
Joined
Dec 6, 2017
Messages
129
I have a form with a tab control that has 3 pages. The master job number is entered on the first page, along with some other info.

I have subforms on each of the second and third pages on the tab control. I have the master / child fields set to populate the job number field on the subforms.

My question is this - how do I go about saving the record entered on the first page so it will populate the linked fields on the second and third pages? It works if I navigate away from the record on the first tab and go back to it but that is clunky.

Should I use DoCMd.Save somewhere on the form or the first tab page? Which property would I use to do that?

Thanks in advance.
 

Minty

AWF VIP
Local time
Today, 20:18
Joined
Jul 26, 2013
Messages
10,380
You can use

If Me.Dirty Then Me.Dirty = False

in the OnChange tab control event to save the changes in the current record as soon as you select another tab ?
 

JHB

Have been here a while
Local time
Today, 21:18
Joined
Jun 17, 2012
Messages
7,732
Use the event "On Change"
Code:
Private Sub YourTabControl_Change()
  If Me.Dirty Then Me.Dirty = False
End Sub
 

Users who are viewing this thread

Top Bottom