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

How do I insert data into a table that is NOT the

Status
Not open for further replies.

dalynching

IS-IT--Management
Apr 2, 2003
7
US
How do I insert data into a table that is NOT the Record source for the form. I have a customer form that is linked to the customers table. I want to take the first and last name fields from this form and also enter them into the clients table for later use. Thanks in advance.

Dalynching
 
Open a recordset with

dim rs as Recordset
set rs = CurrentDb.openRecordSet("tblCustomers")
rs.AddNew
rs!FirstName = Me.FirstName
rs!LastName = Me.LastName
rs.update
rs.close
set rs = Nothing

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top