Thanks to @ mbizup and @als315 for their help with this.
I have a main form: mFrm_Patient_Details (with a combobox)
Then a sub form (sFrmTreatmentDetails) which @mbizup and @als315 very kindly helped me with This now increments the treatment number when the button is clicked.
I have tried adapting this to work for the session subform (subform to SFrmTreatmentDetails) see code below - alas, a new number doesn't appear..
Private Sub Form_Current()
If IsNull(Me.SessionNumber) Then
Me.SessionNumber = Nz(DMax("SessionNumber", "tbl_Session_Details", "TreatmentNumber=" & Forms!subsFrm_Session_Details!TreatmentNumber)) + 1
Also what is the difference between putting this code in OnCurrent or OnInsert for the form properties? What piece am I missing? hyperbaric03.accdb