I have got myself into a total muddle over this and not sure where to
turn.
I have 2 tables;
Customers - which has a primary key of customerID
Appointments - which has a primary key of AppID
I have created a form to enter appointments made (with customers).
This is based on the two tables above (one to many relationship exists
between the account ID fields)
The idea is that AppID is an autonumber filled in when I open the form.
Then the user selects the outer postcode of the customer) from a combo.
This populates a list of customers in a second combo and the user
selects the customer the appointment is with. These details autofill
fields on the form with the customer address details etc.
However if I do not have an AccountID field on the form it does not
work. If I do have an accountID field (populated automatically by the
selction from combobox 2) I get an error saying;
"Te changes you requested to the table were not successful because they
would create duplicate values in the index, primary key or
relationship."
I don't know whether this is because the db is presuming I am trying to
re-add the account to the accounts table. Or something else! I don't
know how to fix this - I am not trying to add the account just view the
details of the account and record in the appointments table that I have
made an appointment there!
Thanks.