Timing Allow Additions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a continuous form that after each update the user is not allowed to
enter new records for 10 minutes (using a timer). But when I set the
allowadditions = true the focus is still in the previous record. I would
like for the focus to move to blank field. Can anyone help me? Below is the
code I have so far.

Private Sub Form_Timer()
Me.AllowAdditions = True
Me.SaleID.SetFocus

Private Sub Form_AfterUpdate()
Me.AllowAdditions = False
End Sub
 
Try adding the following to go to a new record before you setfocus to the
SaleID control:

docmd.GoToRecord,,acNewRec
 
That worked

Thanks Sandra

Sandra Daigle said:
Try adding the following to go to a new record before you setfocus to the
SaleID control:

docmd.GoToRecord,,acNewRec

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I have a continuous form that after each update the user is not
allowed to enter new records for 10 minutes (using a timer). But
when I set the allowadditions = true the focus is still in the
previous record. I would like for the focus to move to blank field.
Can anyone help me? Below is the code I have so far.

Private Sub Form_Timer()
Me.AllowAdditions = True
Me.SaleID.SetFocus

Private Sub Form_AfterUpdate()
Me.AllowAdditions = False
End Sub
 
Back
Top