Combo boxes in form

M

MaCh

Hi

I have a form named Client containing the information of the Client
and attached to it is a subform Parent which has information about
Client's parent. In the client form, i put a combo box for Client ID
and when i select a Client ID and go to the subform to enter or edit
information about parent, it gives me an error.

"The changes you requested to the tables were not successful because
they would create duplicate values in the index, primary key or
relationship. Change the date in the field or fields that contain
duplicate data, remove the index, or redefine the index to permit
duplicate value entries and try again."

I dont know the reason behind it. I use the following procudure in
creating the form and combo box.

1. I made a form using wizard and selected fields from two tables ,
Client and Parent.
2. Using wizard option, I selected by form with subforms and tabular
format.
3. After the form is made, I changed the Client ID to combox box.

Can anyone help me in finding my error.

Thanks

MaCh
 
R

Rick Brandt

MaCh said:
Hi

I have a form named Client containing the information of the Client
and attached to it is a subform Parent which has information about
Client's parent. In the client form, i put a combo box for Client ID
and when i select a Client ID and go to the subform to enter or edit
information about parent, it gives me an error.

"The changes you requested to the tables were not successful because
they would create duplicate values in the index, primary key or
relationship. Change the date in the field or fields that contain
duplicate data, remove the index, or redefine the index to permit
duplicate value entries and try again."

I dont know the reason behind it. I use the following procudure in
creating the form and combo box.

1. I made a form using wizard and selected fields from two tables ,
Client and Parent.
2. Using wizard option, I selected by form with subforms and tabular
format.
3. After the form is made, I changed the Client ID to combox box.

Can anyone help me in finding my error.

It sounds like want to use the ComboBox to "navigate" to a specific client. If
that is the case then it should not be a bound control (ControlSource property
should be blank). If you have it bound then you are actually changing the value
of the first record when you make a selection to a value that already exists in
some other record (thus the error).

ComboBoxes are either bound controls for making entries in forms OR they are
used to navigate or select a record to display. They cannot do both of those at
the same time.
 

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