How not to select duplicate records in a listbox

F

F. N'Jie

I have a listbox where the user selects only one value at
a time. The problem is that once the user selects the
value and the record is updated in the table, they can
reselect the same value again. I do not want this to
happen. Your input is greatly appreciated. Thanks.
 
L

Larry Linson

Use some indication that the record has been updated (most likely in the
table) and requery the listbox after each update. Be sure to clear the "has
been updated" indicator before the end of whatever you define as the
"session" in which duplicate updates are not permitted. (What do you do if
someone updates and then realizes they made an error in the value they
entered, though?)

Please follow up or clarify here in the newsgroup, not by e-mail. Thanks.

Larry Linson
Microsoft Access MVP
 
F

F. N'Jie

The form is a subform and the Recordsource is a query.
The listbox holds survey questions and is part of a
subform. For every item selected from the listbox, there
are corresponding textboxes populated with answer choices.
The row source is a select query (lookup table).
For each 1 record in the main form, there should be 10
records in the subform and the linking fields are date
period and office number.

I want the user to select 1 item per record from the
listbox (example: 10 items in the list, 10 records
total.) If the user re-selects the same item again as new
record 11, there should be a warning message saying the
item has already been selected. If the user realized they
selected the wrong choice after moving to the next record,
they can navigate back to the record and change their
selection


(What do you do if
 

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