Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR MESSAGE

Status
Not open for further replies.

csegal

Technical User
Jun 12, 2001
38
US
Hello,
I am getting a frequent error message:
(There is no field named 'Tag Number' in the current record)

I have a form in access 97 a particular button on the form a).prints the current record
b).saves the record
c).goes to the next new record (blank form)
d). Cursor starting point is the field "Tag Number"
Problem is when i press the print button this error message pops up and does not forward to the new record.

The current script for my print button is:

Private Sub Command23_Click()
On Error GoTo Err_Command23_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.PrintOut acSelection
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "Tag Number"


Exit_Command23_Click:
Exit Sub

Err_Command23_Click:
MsgBox Err.Description
Resume Exit_Command23_Click

End Sub

I need some help with this as it is confusing to other users and it is plagueing me.

Thanks
csegal@arrowair.com
 
If there is no control named "tag number" then remove the line goto control "tag number". Life's a journey enjoy the ride...

jazzz
 
Yea, to me it sounds like the table behind the form has a colum named "tag number", but it's probably named different on the form... go into the form's design view and double click on the field you want to move the focus to...

Then click on the all tab, and at the very top of that list is the control's name. put that name into the code you're using...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top