Validation on a combo box selection

kate10123

Registered User.
Local time
Today, 21:27
Joined
Jul 31, 2008
Messages
185
Hi there,

I have a main form called frm_tutor and a subform called frm_tutorial1. In the subform I have a field called TutorialType which is a combo box. On hitting a save button that I have made, I want to write an If function that checks that a TutorialType has been selected.

How would I write this?
 
you can simply set the tutorialtype field required property to "Yes", and this will ensure that a value has been selected.
 
I can't seem to find that property in Access 2007...
 
unfortunately i am still on Access 2003 but that property is usually found at table level, but once you set it there it will have effect on the combo box as well.
 
Max's approach will work, but using the Validation Rule Property at table level is probably more user friendly, because there is also the Validation Text Property where you can enter a custom message that will pop up to warn the user against leaving the TutorialType empty. The Required field violation pops up a message, but it's Access generated and can be confusing.
 

Users who are viewing this thread

Back
Top Bottom