Primary key changed to Zero in table

M

mthiruma

I have a weird problem. I have a couple of tables - have the same
primary key. I run a query to select the fields from both the tables.
I try to update one of the fields with some data and when I save it,
the primary key of the corresponding record is changed to zero. The
primary key is also changed in the other table. I only want the
changes to be saved - the primary key should not be altered in both
tables.

How do I solve this? Any thoughts?

Thanks
 
J

John W. Vinson

I have a weird problem. I have a couple of tables - have the same
primary key. I run a query to select the fields from both the tables.
I try to update one of the fields with some data and when I save it,
the primary key of the corresponding record is changed to zero. The
primary key is also changed in the other table. I only want the
changes to be saved - the primary key should not be altered in both
tables.

How do I solve this? Any thoughts?

Thanks

One to one relationships are quite rare; are you certain that your table
structure is correct? If you truly have two tables with the same primary key,
why not just combine the fields into one table? Or are you storing data
redundantly?

Please post the SQL view of the query and indicate which field you're trying
to edit. It shouldn't be changing the PK to 0.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top