trying to change a primary key on form/linked subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

does anyone know if this is possible? I have a subform within a form, they
have a relationship link. The field is a indexed primary key, can this be
editted ?
 
does anyone know if this is possible? I have a subform within a form, they
have a relationship link. The field is a indexed primary key, can this be
editted ?

What are you trying to change - the value in the mainform or in the
subform? WHY are you trying to change it: once a primary key has been
assigned, what prompts you to change it?

If you're changing the Primary Key on the mainform, you need to meet a
couple of constraints: it cannot be an Autonumber type field, because
autonumbers cannot be edited; and you must have Cascade Updates set on
every relationship involving this field, in order that the foreign
keys should follow the changes to the primary key.

John W. Vinson[MVP]
 
Lets say... the custumer no. is the primary key in the main form. When this
key is entered it is automatically updated on the subform.
Scenario: nextday I discovered that the customer no. was entered incorrectly.
I try to correct the customer no., but what happens is because I am putting
in a different customer no. the result is I have entered a new record
instead of correcting the incorrectly entered record.

I have one-to-many relationship with all 3 boxes checked , enforced
Referential Intergity , Cascade update related fields and cascade delete
related records.

This is a little data entry form that I have developed for a client.

I am also having problems with date entries... when the set format is
mmddyyyy and the data that has been entered is 31032006... Access seems to
switch the ddmm to mmdd for me automatically...I would like it to tell the
entry person to stop and look.
How do I do that? Is there something I have to turn off?
 
Back
Top