David Ball
Registered User.
- Local time
- Tomorrow, 04:36
- Joined
- Aug 9, 2010
- Messages
- 230
Hi,
I have a form with a subform where the user can select multiple items from the combobox in the subform. I want to make it impossible for the user to select the same value twice from the subform for any given record in the form. I tried to do this by setting up the intermediate table behind the subform with the two fields as a combined primary key. This didn’t work and was quite messy.
I am wondering if VBA would be a better way to handle this.
What VBA code would I use to check if a duplicate value has been selected then show a message, “That value already assigned”, if a duplicate is selected. Then give the user the option of selecting another value or cancelling the operation?
Thanks very much
Dave
I have a form with a subform where the user can select multiple items from the combobox in the subform. I want to make it impossible for the user to select the same value twice from the subform for any given record in the form. I tried to do this by setting up the intermediate table behind the subform with the two fields as a combined primary key. This didn’t work and was quite messy.
I am wondering if VBA would be a better way to handle this.
What VBA code would I use to check if a duplicate value has been selected then show a message, “That value already assigned”, if a duplicate is selected. Then give the user the option of selecting another value or cancelling the operation?
Thanks very much
Dave