Validation of Unique Fields Already Used & Query Help

J

Jani

In my db 3 fields make up the unique key. In the header, I have a combo box
that works from a query. When the selection is made, an After Update event
populates the data into the last record in the detail section, etc. and this
works fine. A location field is also populated on the record from a selection
made on the main form. A tab then puts the cursor in the appropriate row to
continue entering data. When the record is complete the data is entered on a
SQL table which includes the location. The problem is that the User never
knows until entering all the data and moving off the record if that unique
selection has been made previously - and I am not checking by location as
should be done. Is there a way to check if the 3 fields and the location are
already in the SQL table after the selection? Or create the query for the
combo box that lists only the unique fields that have not been used? Hope
this makes sense and someone can assist me! Jani
 
M

mscertified

You definitely want to prevent the user from making the disallowed choice.
Allowing a disallowed choice and then generating an error message is very bad
user interface design.
I don't fully understand your form but you need to populate the selections
with only valid choices.
If this is your combo box, the SQL needs to have a WHERE clause added or
modified to prevent invalid choices from appearing.

Dorian
 

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