on last enter start new blank form

J

JMD.Park

is there a way to have a new blank form start after entering last input of
information? Thanks in advance for the help!
 
J

Jeff Boyce

If you set the form's property to add new records, and add a <Save> command
button, you should get "a new blank form". If you're asking how to have it
happen without the <Save> button, how will Access "know" when you're
finished entering data?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

John W. Vinson

is there a way to have a new blank form start after entering last input of
information? Thanks in advance for the help!

If the "Cycle" property of the form is set to the default "All Records", and
you use the Enter or Tab key on the keyboard to move from control to control
(rather than the mouse), Access will indeed move to a blank new record after
the last control in the form's tab order.

If you're using the mouse exclusively, then Access may not have any way to
know when you're done.
 
J

JMD.Park

Receive error "can't find the object 'DoCmd'"

KenSheridan via AccessMonster.com said:
In the AfterUpdate event procedure of the control in question put the
following code:

DoCmd.GoToRecord acForm, Me.Name, acNewRec

This will take you to a blank new record immediately after entering data in
the control, whether you’ve just entered a new record or edited an existing
one. But bear in mind that a user might not necessarily enter the data in
the controls in the correct order. An alternative would be to make sure that
the control is last in the form’s tab order, and put the above code in the
form’s AfterUpdate event procedure rather than the control’s. This would
mean that the form would move to a new blank record either after entering
data in the control, or if after entering data in the control and then moving
back to another control with the mouse or Shift-Tab, they then save the
record explicitly or by moving off it with the navigation bar.

Ken Sheridan
Stafford, England

JMD.Park said:
Last entered would be enter or tab after last field
If you set the form's property to add new records, and add a <Save> command
button, you should get "a new blank form". If you're asking how to have it
[quoted text clipped - 10 lines]
 
J

John W. Vinson

Is working now, have to tab through buttons. Thanks!

aha!!!

You can set the Tab Stop proprety of a control to No if you want to avoid this
hassle. On the other hand, it's often helpful to have buttons in the tab
sequence - you can click the button by tabbing to it and pressing the
spacebar, and never need to touch the mouse at all.
 
J

JMD.Park

Tried in event procedure still not recognising docmd.

KenSheridan via AccessMonster.com said:
Sounds like you might have entered the code directly in the properties sheet,
not in the event procedure. To enter code in an event procedure you select
the event property in the properties sheet, click the ‘build’ button (the one
with the three dots), select ‘code builder’, then enter the code in the VBA
window which opens.

Ken Sheridan
Stafford, England

JMD.Park said:
Receive error "can't find the object 'DoCmd'"
In the AfterUpdate event procedure of the control in question put the
following code:
[quoted text clipped - 22 lines]
 
J

JMD.Park

Changed tab stop to no. Thanks to everyone for help

KenSheridan via AccessMonster.com said:
Check that you have no missing or broken references.

Ken Sheridan
Stafford, England

JMD.Park said:
I am using tab, and the cycle control is set to all records. Still doesn't
work.
is there a way to have a new blank form start after entering last input of
information? Thanks in advance for the help!
[quoted text clipped - 6 lines]
If you're using the mouse exclusively, then Access may not have any way to
know when you're done.

--



.
 

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