I have been poking at this all day. I have two SQL tables (SQL 2005), which I have linked via two fields (serial number and part number). These two tables are used in a form in Access 2007. I am trying to capture data in the second table for decisions about the first. This process works fine as long as the serial number and part number exist in the second table. What I am trying to do is add the serial number and part number to the second table FROM the first only when the user tries to input data.
If Me.[dbo_isd_lease2].[epserial_id] = Me.[dbo_isd sacd].[epserial_id] Then End
Insert into dbo_isd_lease2 ([epserial_id],[epprod_id]) VALUES (Me.[dbo_isd sacd.epserial_id],Me.[dbo_isd sacd.epprod_id])
If the tables are linked, why do you have to use code to add values to the other table? One table is master and one child. If you create new record, the primary key values from master should automatically populate the child foreign key fields.
This post has been edited by June7: 28 May 2010 - 11:11 PM