Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Syntax for OR controls

Status
Not open for further replies.

Neak1

Computer
Sep 10, 2001
12
0
0
US
Hello Everyone,
I have a form wil 7 control 3 of which must be coded at all times.

Example: The first control is a yes/no box. If the answer to the question is yes, then controls 1&2 must be coded or 3&4 must be coded or 5&6 must be coded. I have tried using or between each group of controls and this is not working what other way would you recommend that I try.

Please Help
Neaka
 
Replies continue below

Recommended for you

Use the FirstControl_Click method to trap the user making a change. Then, modify the remaining controls as didcated by the value.

As an example:
Code:
Sub FirstControl_Click()
    If FirstControl.Value = True Then 'Use textbox 1 & 2
       TextBox1.Enabled = True
       TextBox2.Enabled = True
       TextBox3.Enabled = False
       TextBox4.Enabled = False
       TextBox1.SetFocus
    Else ' No means use boxes 3 & 4
       TextBox1.Enabled = False
       TextBox2.Enabled = False
       TextBox3.Enabled = True
       TextBox4.Enabled = True
       TextBox3.SetFocus
    End If
End Sub
I am not sure what you meant by "using or between each group". It may help if you post some of your code to bring us up to speed. DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Here is the situation,

I have 7 controls as stated above. I am trying to find out what type of syntax to use in order to do the following.

The first control asks the question.
Is there a payment discrepancy? "Y" or "N" (are the two options for this 1 position control)

The other 6 controls will be filled in pairs of two if the answer is "Y". For example:

Field 2: Current Amount Field 3: Current Amount Effect
Field 4: Retro Amount Field 5: Retro Amount Effect
Field 6: Future Amount Field 7: Future Amount Effect

If the first field is filled in with a "Y" then Current Amount and Effect or Retro Amount and Effect or Future Amount and Effect must be filled in, one of the set of pairs must be code but not all pairs if the answer is "Y". I stated that they were groups because they must be filled in, in pairs of two. The amount and the effect must be coded together. There can't be Current Amount with a Currenct Amount Effect.

Amounts are dollar values, and Effects are Alpha characters.

I hope that this make it more clearer. I have not written any code because what I had was not working so I deleted it. But if you want to see what I had before here it is.

Please Help
Neaka
 
Are any of your fields tied to a database?
Your last post was more confusing than the first.
How about giving a little more information, lets say an example of what you intend to input and into which field as well as what you want to see in the other fields.
This might clear things up a little.
 
Status
Not open for further replies.
Back
Top