Limit user to select from 1 of 2 combos per record

disneyplace

Registered User.
Local time
Today, 06:19
Joined
Feb 26, 2002
Messages
10
I have 2 combos on a subform (cmbPurchase & cmbFactory). I only want a user to make a selection from one of the 2 combos. So if a choice is made from one combo, lock the other or vice versa? There should be a message displayed which resets the combos when the message is acknowleged, but only if the user tries to create a new record?
 
IN the BeforeUpdate of each Combo, test for the value of the other using > 0 or IsNull (depending on the data type of the combo's bound column). If the other combo already contains a value, use the cancel property of the Before update event to stop the transaction and Me.cboWhatever.Undo to reverse the values added.
HTH
Chris
 
Thanks for that. It works a treat!

TAC
 

Users who are viewing this thread

Back
Top Bottom