Make a box invisible

dadrew

Registered User.
Local time
Today, 18:25
Joined
Sep 15, 2003
Messages
186
I belive I have done this before but I cant remember how!

I have a continuos form with two text boxes on it and a check box.

I am trying to say if text box1 = "1" then text box 2 is visible if text box 1 = 2 then text box 2 is invisible. I am doing this on a tick box (for other reasons) so my code looks like this:

If Me.Text1 = "1" Then
Me.Text2.Visible = True
End If
If Me.Text1 = "2" Then
Me.Text2.Visible = False
End If

It works, kind of. The trouble is because its a continuous form all the Text2 boxes become visible or invisible depending rather than just the one record i'm working on. Is there a soloution to this?
 
In a continuous form the only way around something like this is conditional formatting. To simulate making a text box non-visible you would have to set the text box's Special Effect property "Flat", the Border Style "Transparent" and then in conditional formatting, set the text color and back color to match the back color of your form when the condition is met.
 

Users who are viewing this thread

Back
Top Bottom