Tab Indexes on a Data Entry Form

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

Guest

Hi,

I have a form that is used mostly for data entry, but also has a few other
command buttons on it. I have assigned the tab indexes how I would like it no
problems. What I want to do is when I click btnNew_Company (tab index of 10)
I would like the form to load a new record (which it does) and position the
user in txtCompany_Name which has a tab index of 1. Below is the code
attached to the clicking of the button:


Private Sub btnNew_Company_Click()
On Error GoTo Err_btnNew_Company_Click


DoCmd.GoToRecord , , acNewRec

Exit_btnNew_Company_Click:
Exit Sub

Err_btnNew_Company_Click:
MsgBox Err.Description
Resume Exit_btnNew_Company_Click

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

Similar Threads

lock button 15
Jet Engine Error Message 2
Access Pop-Up Calendar 2
creating a new record with a unique ID # 23
Code to open a query 2
Access forms "add record" 5
Open new form 1
Form button opens blank form 10

Back
Top