Pressing Tab to add a new record at the end of one record in a for

B

briangw

Back in Access 97 and 2003, I noticed that when you reach the end of a record
in a form and press tab, it used to take you to a new record. But, in Access
2007, it's not doing that. Please let me know what I need to check for to
enable this function.
 
J

Jeff Boyce

There's a form property (Cycle) that affects how a <Tab> affects the screen.

You can set it to (re-)cycle back through the fields of the record you're
on, or move to the next record.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

briangw

Thanks! That worked! One more question. How can you setup the form to
automatically start at a new record upon opening the DB without hiding the
previous records? Whenever I launch the DB, it always starts at record 1.
 
J

Jeff Boyce

Are you saying you want to ONLY add new records? If so, check the form
property DataEntry (=Yes).

(PS ... then how will you edit a previously-entered record?)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
T

Thardy

It sounds to me like he wants it to be able to add AND edit but open
on a new record rather then number 1.
 
J

Jeff Boyce

Feel free to offer a solution to your interpretation...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

It sounds to me like he wants it to be able to add AND edit but open
on a new record rather then number 1.

if so, put code in the form's Load event:

Private Sub Form_Load()
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson [MVP]
 
B

briangw

Thank you. I will try that.

John W. Vinson said:
if so, put code in the form's Load event:

Private Sub Form_Load()
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson [MVP]
 
B

briangw

That did not work. Under the code builder, I added it, but upon opening the
form, I got

" Run-time error '2105':

You can't go to the specified record."

Any ideas?
 
J

John W. Vinson

That did not work. Under the code builder, I added it, but upon opening the
form, I got

" Run-time error '2105':

You can't go to the specified record."

Any ideas?

Just an apology for posting in haste, and a correction:

DoCmd.GoToRecord acDataForm, Me.Name, acNewRec


John W. Vinson [MVP]
 
B

briangw

It worked! Thanks!

John W. Vinson said:
Just an apology for posting in haste, and a correction:

DoCmd.GoToRecord acDataForm, Me.Name, acNewRec


John W. Vinson [MVP]
 

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