Multiple criteria to be met problem

Ice Rhino

Registered User.
Local time
Today, 03:13
Joined
Jun 30, 2000
Messages
210
I have a series of text boxes on my form. The user makes various selections in order to submit a query to the database. The default value for these boxes is *

When the user clicks on the submit button, I only want the code to run for the button as long as not all of the boxes still have a * in them.

What direction should I head off in when it comes to coding this. basically, as long as at least one of the 5 boxes does not contain a star then run blah blah blah code, else, display message (I know this bit).

Regards
 
How about something like this in my quick test I only used to boxes text0 and text2


Dim count As Long
count = 2
If Me.Text0.Value = "*" Then count = count - 1
If Me.Text2.Value = "*" Then count = count - 1
If count > 0 Then GoTo lrun
Exit Sub
lrun: MsgBox "run code"
 
More than one way to skin a cat. I like that approach, that'll do

Thank You
 

Users who are viewing this thread

Back
Top Bottom