a14929
04-09-2000, 12:07 PM
OK, I have a combobox on a form. Is there a way to ensure that once an item is selected from the combobox, it cannot be selected again in another record - the item is unique.
|
View Full Version : ComboBox Problems... a14929 04-09-2000, 12:07 PM OK, I have a combobox on a form. Is there a way to ensure that once an item is selected from the combobox, it cannot be selected again in another record - the item is unique. Carol 04-09-2000, 02:39 PM Yes there is a way. In the underlying record source for the form, make another field with a Yes/No property. Call this field "Used". You attach this field to the form - make it hidden. On your save button for the form, a macro is run that turns this field to Yes. In the underlying record source for your combo box, include this Used field and in your criteria line state "No", that way your records that show up in the combo box will only reflect unused records. Your macro action would be Set Value and would be like the following: Item: [Forms]![YourFormName]![Used] Expression: Yes On your save button include this macro in the "On Exit" properties. Good luck. [This message has been edited by Carol (edited 04-09-2000).] [This message has been edited by Carol (edited 04-09-2000).] [This message has been edited by Carol (edited 04-09-2000).] |