VB Select Case Statement

flavi

Avg Access Guy
Local time
Today, 04:43
Joined
Jun 16, 2008
Messages
14
Hello. I would like to know if using a select case statement would be more appropriate than an If Then statement. I have 3 fields in a form.

fldDIST
fldADDRESS
fldCITY

I would like to make it where a user cannot see the submit button until all three fields have entries or are "not null". Then once these 3 fields have the required data, then the Submit button (btnSUBMIT) would show up and allow for processing the form. Is there a simple way to do this is one short vb code?

Any suggestions?
 
Personally I don't typically bother enabling or hiding the submit button, I just perform validations first in the code behind the button. Either way, a simple test would be:

If Nz(FirstField, "") = "" OR Nz(SecondField, "") = "" OR Nz(ThirdField, "") = "" Then
 
Personally I don't typically bother enabling or hiding the submit button, I just perform validations first in the code behind the button. Either way, a simple test would be:

If Nz(FirstField, "") = "" OR Nz(SecondField, "") = "" OR Nz(ThirdField, "") = "" Then


Thank you for your advice! I appreciate it!
 

Users who are viewing this thread

Back
Top Bottom