visible/invisible text box based on two criteria (1 Viewer)

sparkyrose

Registered User.
Local time
Yesterday, 21:13
Joined
Sep 12, 2007
Messages
31
Hi all,

I have a text box that should only be visible when one combo's value is "No" AND a second combo is Null.

This is the code I have but it's not working; the text box is invisible at all times.

If it matters, Combo368 is bound to Boolean field in a table, with the combo's Row Source Type set to Value List, and having Yes and No options.

Any help greatly appreciated,

Code:
Private Sub Form_Current()

    If Combo368 = "No" And IsNull(IfNoRequest) Then
        TxtIfNoName.Visible = True
    Else
        TxtIfNoName.Visible = False
       
    End If
    End Sub
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:13
Joined
Aug 30, 2003
Messages
36,133
If it's Boolean you don't want quotes around the value.
 

sparkyrose

Registered User.
Local time
Yesterday, 21:13
Joined
Sep 12, 2007
Messages
31
Of course, thanks!

For the benefit of others, I actually had to change it to 0 rather than just removing the quotes.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:13
Joined
Aug 30, 2003
Messages
36,133
Happy to help! Interesting, as normally it will correctly interpret False and No. Using 0 is safest anyway though.
 

Users who are viewing this thread

Top Bottom