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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update or CancelUpdate without Addnew or Edit

Status
Not open for further replies.

dumdum2

Programmer
Mar 18, 2000
98
GB
I keep getting this message and I can't seem to figure out why.....

I have a form where the user enters a filename. A command button is pushed and another form opens. The code behind the command button is:

Dim stDocName As String

stDocName = "external_main"
DoCmd.OpenForm stDocName
DoCmd.GoToRecord , , acNewRec
Forms![external_main]![filename] = Forms![enter image name]![filename]
DoCmd.RunCommand acCmdSaveRecord

The filename gets carried over ok, but after I enter the data in the next field (a title field), I get the message mentioned above. If I skip the next field and enter data in other fields on the form and then come back to the title field, I don't get the error message....

Why do I get this message if there is a new record added?

Thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top