Combo box

  • Thread starter qkimchi via AccessMonster.com
  • Start date
Q

qkimchi via AccessMonster.com

Please help!

I created a combo box called, "cmbLocation" and a look up table called,
"tblLocation".
I would like to set a rule for the combo box cmbLocation that allow the user
to select an item from the list(tblLocation) once time only else it will pop
up a message said, "Duplicate entry".

what I meant is that the item on the tblLocation can only be used 1 time.

THANK YOU!
 
C

Carl Rapson

What are you doing with the item once it is selected? Assuming it's being
stored in a table somewhere, in the BeforeUpdate event of cmbLocation you
could check there to see if there is already an entry with that value. If
there is, let the user know (MsgBox) and set the Cancel parameter of the
event to True to cancel the update and remain in the combo box for another
selection.

Carl Rapson
 

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