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

One click to create new record in two tables

Status
Not open for further replies.

pradh

Technical User
Oct 29, 2004
9
US
Hi,

I have one form containing fields from two tables.
When I load this form I would like to create new records in Table1 and Table2, and update the key ID(autonumber) of these records to text boxes provided in the form. These ID's will then be stored in the Table 1.

Any hint is appreciated.

Thank you
Pradh
 
are these tables joined? are you basing your form on a query based upon these 2 tables?
 
I was able to figure it out myself.
Using something like this

DoCmd.RunSQL "INSERT INTO JIENEW (JIEA) VALUES (11111111)"
Me![PartNumber] = DLookup("JIEPartNo", "JIENEW", "[JIEA]= 11111111")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top