Help... On my form i have a button that does several things...
1). Saves the record
2). Prints the current record
3). Advances to the next new (blank) form (record)
4). Places the cursor at the field named ETR as the starting point for the next new record.
Often times but not every time I get an error message that
says:
Run-Time error '2109'
There is no field named 'ETR' in the current record.
I then have an option to END or DEBUG,
When I click DEBUG the code that is highlighted is:
DoCmd.GoToControl "ETR"
I DO clearly have a field named ETR in both the table and form.
My entire code for this button is as follows:
Private Sub Command23_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.PrintOut acSelection
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "ETR"
Exit_Command23_Click:
Exit Sub
End Sub
Is something wron or missing???
I am using Access 97 on Windows 98
Thanks again,
csegal@arrowair.com
1). Saves the record
2). Prints the current record
3). Advances to the next new (blank) form (record)
4). Places the cursor at the field named ETR as the starting point for the next new record.
Often times but not every time I get an error message that
says:
Run-Time error '2109'
There is no field named 'ETR' in the current record.
I then have an option to END or DEBUG,
When I click DEBUG the code that is highlighted is:
DoCmd.GoToControl "ETR"
I DO clearly have a field named ETR in both the table and form.
My entire code for this button is as follows:
Private Sub Command23_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.PrintOut acSelection
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "ETR"
Exit_Command23_Click:
Exit Sub
End Sub
Is something wron or missing???
I am using Access 97 on Windows 98
Thanks again,
csegal@arrowair.com