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

AddNew

Status
Not open for further replies.

starswirl

Technical User
Aug 3, 2003
5
US
I am trying to add information from the textboxes on my form to the database on the system and it is giving me the error message

Run-time error '3426': This action was cancelled by an associated object.

This is the statement I am using:

Data1.Recordset.AddNew
Data1.Recordset.Fields("ApDate") = Text1.Text
Data1.Recordset.Fields("Time") = Text2.Text
Data1.Recordset.Fields("LastName") = Text3.Text
Data1.Recordset.Fields("FirstName") = Text4.Text
Data1.Recordset.Fields("DOB") = Text5.Text
Data1.Recordset.Fields("PhoneNumber") = Text6.Text
Data1.Recordset.Fields("OtherNumber") = Text7.Text
Data1.Recordset.Fields("Transportation") = Text8.Text
Data1.Recordset.Fields("Notes and Comments") = Text9.Text
Data1.Recordset.Update
Data1.Recordset.Close

I am trying to find out why I am getting this message.
 
Have you made sure that the names of your textboxes are text1, text2 etc?

Rgds

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top