I have two tables (Table1 and Table2) and I use forms to enter data. There is a numeric field in the first and second form named SID. I have set the data control source on the second form (Form2) SID field to =Forms!Form1!SID. After completing data entry on Form1, I use a command button to open Form2 and the SID field data from Form1 is automatically entered in the SID field in Form2. However, after filling out the remaining data on Form2 and exiting the forms, I check the data in Table2 and the SID value is not being saved. The other data that was entered is saved but the SID number pulled from Form1 shows up as "0" in the table. I also tried modifying the code on the OpenForm event with OpenArgs but that didn't work either.
I suspect this is a common use for passing a primary key value from Table1 to Table2 (foreign key). Eventually I'll hide the fields but I need to know why the numeric value transferred is not being saved in the table.
Im using Access 2003. Thanks!