virtualjay
Programmer
Hello. I have been using Access for some time, but am very new at using .ADP projects with SQL Server. I have a form which works in every respect, except for when I try to add a record. I am using Access 2002 and SQL Server 2000. I "upsized" my .MDB project. A simplified example will illustrate my problem. I have 3 tables. Each has the same primary key, CLIENTID. Each table has different data about this client, so Table1 has two fields, ClientID (int) and Data1 (varchar). Table2 has two fields, ClientID and Data2. Table3 has two fields, ClientID and Data3. I have set up the relationships, which are simple one-to-one relationships between Table1-Table2 and Table1-Table3. In Table1 I have set ClientID to be an Identity value. I have a form which allows me to view ClientID, Data1, Data2 and Data3. Works great. But when I try to add a new record, I get either "You can't update the record because another user or application deleted it or changed the value of its primary key" or "Invalid input parameter values.Check the status values for details.". I have created exactly the same scenario in an MDB and the form works great. I suspect the problem is related to the timing of when Table1.clientID receives its value. As an "autonumber" field in the .MDB it is displayed as soon as I leave the Table1.data1 field, which is not the case for the SQL "identity" value. I have tried a number of options, all of which have failed so I won't recount them here except to say that selecting any table as the "Unique Table" property of the form has not worked. I also know it appears that I am using three tables, with the same primary key, when it would seem that I might be better off with a single table using ClientID, Data1, Data2 and Data3, but this is not a workable solution for my situation. I need to continue to use the three dinstinct tables, but add information from a single form. I thank you for any help you can provide!