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
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