R
Rob
I am trying to create a new record with an ID field prefilled in the new
record based on another form.
This code is sloppy in my opinion, but is the only way I know how to do it
because I can't set focus on invisible, non-enabled or locked fields.
DoCmd.GoToRecord , , acNewRec
txtSubPhaseID.Visible = True
Forms!frmProducts!txtSubPhaseID.SetFocus
txtSubPhaseID.Text = Forms!frmPhaseSearch.CboSubphase
Forms!frmProducts!cboVendorID.SetFocus
txtSubPhaseID.Visible = False
Is there a better way?
Rob
record based on another form.
This code is sloppy in my opinion, but is the only way I know how to do it
because I can't set focus on invisible, non-enabled or locked fields.
DoCmd.GoToRecord , , acNewRec
txtSubPhaseID.Visible = True
Forms!frmProducts!txtSubPhaseID.SetFocus
txtSubPhaseID.Text = Forms!frmPhaseSearch.CboSubphase
Forms!frmProducts!cboVendorID.SetFocus
txtSubPhaseID.Visible = False
Is there a better way?
Rob