saving unbound form with PK and FK (PK becomes FK)

icemonster

Registered User.
Local time
Today, 16:58
Joined
Jan 30, 2010
Messages
502
so how can this be done? i have two tables that uses the PK of tblA as a look up for tbl B making it the FK for tbl B.

i have an unbound form that has all the fields for both tblA and tblB but thing is, when using the rs.new, it only generates the autonumber for tblA, how can i include or copy the PK of tblA to the field for the FK in tblB?
 
You'd have to have tbla and tblb in separate recordsets. On an event, say a button click, you'd have to navigate to the correct record in both recordsets, then just do something like
Code:
tblb_recordset.edit
tblb_recordset!keyvalue = tbla_recordset!keyvalue
tblb.recordset.update
 

Users who are viewing this thread

Back
Top Bottom