Go to a new record on a subform

  • Thread starter Thread starter pokdbz
  • Start date Start date
P

pokdbz

I have a main form with a button on it to save.

On the subform I have a call log that has multiple call logs.

I would like to hit the save button on the main form and then make the
subform go to a new record.

How can I do this?
 
Moving focus from the subform to the main form will in and of itself, save
the subform record so the save button on the main form is redundant.

Tabbing out of a new record in the subform from should automatically bring
you to a new empty record.
 
Pat Hartman said:
Moving focus from the subform to the main form will in and of itself, save
the subform record so the save button on the main form is redundant.

Tabbing out of a new record in the subform from should automatically bring
you to a new empty record.
 
hi Lidia,

'~~~~~~~~~~~~~~~~~~~
With Me.subform_controlname
If Not .Form.NewRecord Then
.Form.Recordset.AddNew
End If
'if you want to set the focus
.SetFocus
.Form.ControlName.SetFocus
End With
'~~~~~~~~~~~~~~~~~~

WHERE
subform_controlname is the Name property of the subform control
ControlName is the Name property of a control on the subform

Warm Regards,
Crystal

*
(: have an awesome day :)
*
 
Back
Top