Timing Allow Additions

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
 
S

Sandra Daigle

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

docmd.GoToRecord,,acNewRec
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top