View Full Version : Forms


rkanojia
12-03-2000, 02:25 AM
I have a form with default view as Continuous Forms.

Say there is 3 text boxs

What I want it that
If Text box Yes is Yes then
Text Box 2 = Visible
Text Box 3 = Enabled No
else if Text box No is Yes then
Text Box 2 = Enabled No
Text Box 3 = Visible
end if

What is happening?
Supose if there are ten record.
If in the first record the Text box 1 is Yes then all the Text Box 2 is Visible even though the Text box 1 for the 3rd or the 4th record in that form is No.

Thanks


[This message has been edited by rkanojia (edited 12-03-2000).]

Neal
12-03-2000, 07:55 AM
Try this:

If TextBox1 = "Yes" then
TextBox2.Visible = True
TextBox3.Visible = False
Else:
TextBox2.Visible = False
TextBox3.Visible = True

rkanojia
12-03-2000, 06:20 PM
Hello Neal,

As I have already written that the default view as Continuous Forms. So If I use the below code then only one of the if conditions gets applied to all the Continuous Form

If TextBox1 = "Yes" then
TextBox2.Visible = True
TextBox3.Visible = False
Else
TextBox2.Visible = False
TextBox3.Visible = True
End if

SomeGuy
12-03-2000, 09:49 PM
When is this code being implemented?

It would probably work best in the Form_Current event. As far as I understand, regardless of whether it is a continuous or a single form, the Current event is implemented with each new record so when you switch to record #2 from record #1, it will recheck your If...Then statement to see if the criteria has been met and then follow through with your code.

Hope this helps.

rkanojia
12-03-2000, 11:43 PM
If in the first record value of text1 is Yes then all the Text2 is Visible & all the Text3 is not visible. Irrespective if in the other record Text1 is No.

If you would tell me where to put the code.
I have try placing in On_Open On Load in the form. but no luck