TextBox Visible based on Value of Another Variable

G

Guest

Report Row has five (5) Variables: Contact, and Name_1, _2, _3, _4
How do I make only ONE of the Name_n Text Boxes Visible depending on the
Value of Contact (1, 2, 3, or 4)
i.e.: If Contact = 1 Then Me!Name_1.Visible = True; Me!Name_2.Visible =
False, and so on.

I tried Nested 'IIF's in the underlying Query (actually UDF with @Param)

Also, a simpler Case, variable 'Action' (1, 2, 3, or 4) populated from a
List (of four items): Invite, Attend, Review, Chart.

All this works pretty well in a Form, since I can write a Module. But that
does not Print pretty.

Access 2002 Project, Runtime, against (local) MSDERelA
 
P

Peter Yang [MSFT]

Hello Aubrey,

You could try to test Me!Contact.value to show or hide textbox in
Detail_Format event. For example:

If (Me!CustomerID.Value = "ANTON") Then

Me!Text4.Visible = False
end if

Thanks & Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=====================================================



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
G

Guest

Hi. Peter:

Should I put this control at "on open"?
Also if this field is Yes/No
Should I use
If Me!CustMale= Yes
Then Me!Textbox.Visible= False
End If???

Thanks.

Vivi

Peter Yang said:
Hello Aubrey,

You could try to test Me!Contact.value to show or hide textbox in
Detail_Format event. For example:

If (Me!CustomerID.Value = "ANTON") Then

Me!Text4.Visible = False
end if

Thanks & Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=====================================================



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top