validation in access for fields (1 Viewer)

akika

Registered User.
Local time
Today, 13:16
Joined
Aug 7, 2018
Messages
102
hi,

in a form, i have 2 fields:
country which is text field
category which is a drop-down containing values Europe, US, Asia, Africa, None

how can i add a validation e.g when input country = "France"
then in the drop-down values for category NONE should be disabled

Pls advise?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:16
Joined
Oct 29, 2018
Messages
21,358
Hi. Just curious, if the input country = France, why only None is disabled? Are you saying any selection among US, Asia, or Africa is a valid choice?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:16
Joined
May 21, 2018
Messages
8,463
Here is an example, but if you Google you will find tons of examples and even videos of how to do it
https://www.fmsinc.com/microsoftaccess/Forms/combo-boxes/cascading.html
You will not easily be able to disable a value, but you will be able to remove it. I have some of the same questions as DBguy on the logic. Normally the input is big to small. You pick Europe and in the second combo only see European countries as choices.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 20:16
Joined
Jul 9, 2003
Messages
16,245
hi,

in a form, i have 2 fields:
country which is text field
category which is a drop-down containing values Europe, US, Asia, Africa, None

how can i add a validation e.g when input country = "France"
then in the drop-down values for category NONE should be disabled

Pls advise?

Why are you using a text field for Country when an obvious choice would be a Combo Box listing all the countries?

A second benefit from having a Country selection Combobox would mean you wouldn't have to select the continent, it would be contained as an extra field next to the Country field... So doing it this way you could have an associated text box automatically fill with the continent.

Download the Example Zip file "Country / Region ComboBox Example" from Gumroad....

See more information about combo boxes on Nifty Access Website here:-
Combobox - Show Country & Region
 
Last edited:

Users who are viewing this thread

Top Bottom