E
edtollefsen
I have the following situation:
* form and subform tied together with a field called
invoiceDate.
* form has data from one table
* subform has data from another table. This data
has a 1 to many relationship with the table used in the
form.
If I update invoiceDate from the form the data in the
subform changes appropriately however as soon as I go to
the subform the system throws an error message indicating
data already exists (see below for actual message).
There are 3 circumstances that may happen:
1) I go into the subform without changing the
invoiceDate. Everything works fine
2) I add a new record. Everything works fine.
3) I change the invoice date and enter the suform.
As soon as I click in the subform the data in the form is
saved and since it already exists it throws the error
message. I know don't want to resave the data in the
form it it already exists. I can check for its existance
prior to this. How do I keep the form from saving or is
there a better way to handle this?
COMPLETE ERROR MESSAGE:
"The changes you requested to the table were not
successful because they wold create duplicate values in
the index, primary key, or relationship. Chang the data
in the field or fields that contain duplicate data,
remove the index, or redefine the index to permit
duplicate entries and try again."
* form and subform tied together with a field called
invoiceDate.
* form has data from one table
* subform has data from another table. This data
has a 1 to many relationship with the table used in the
form.
If I update invoiceDate from the form the data in the
subform changes appropriately however as soon as I go to
the subform the system throws an error message indicating
data already exists (see below for actual message).
There are 3 circumstances that may happen:
1) I go into the subform without changing the
invoiceDate. Everything works fine
2) I add a new record. Everything works fine.
3) I change the invoice date and enter the suform.
As soon as I click in the subform the data in the form is
saved and since it already exists it throws the error
message. I know don't want to resave the data in the
form it it already exists. I can check for its existance
prior to this. How do I keep the form from saving or is
there a better way to handle this?
COMPLETE ERROR MESSAGE:
"The changes you requested to the table were not
successful because they wold create duplicate values in
the index, primary key, or relationship. Chang the data
in the field or fields that contain duplicate data,
remove the index, or redefine the index to permit
duplicate entries and try again."