only visible if...

R

ril

Hi All,

I'm self-teaching on Access as I develop a client tracking database
for my facility. I'm probably going to say this wrong, but here goes.

I have a report where I only want to have a particular field
(control?) visible if the data in the field it is boud to says a
specific thing.

The control is in the Detail section of the report, and it's called
Discharge Reason" It refers to a field with the same name in the
query the report is bound to. There are 8 possible entries for this
field, plus "Contract Change" That's the only one I want to see in my
report.

I only want to have the field "Discharge Reason" visible when the data
is "Contract Change"

Do I put this in the properties of the control? If so, where?

Thanks,
Access Neophyte
 
F

fredg

Hi All,

I'm self-teaching on Access as I develop a client tracking database
for my facility. I'm probably going to say this wrong, but here goes.

I have a report where I only want to have a particular field
(control?) visible if the data in the field it is boud to says a
specific thing.

The control is in the Detail section of the report, and it's called
Discharge Reason" It refers to a field with the same name in the
query the report is bound to. There are 8 possible entries for this
field, plus "Contract Change" That's the only one I want to see in my
report.

I only want to have the field "Discharge Reason" visible when the data
is "Contract Change"

Do I put this in the properties of the control? If so, where?

Thanks,
Access Neophyte

You can use code to make the control Visible or not, but it is just as
easy to use an unbound text control.
Set it's Control Source to:

=IIf([Discharge Reason] = "Contract Change",[Discharge Reason],"")

Make sure the name of this control is NOT "Discharge Reason".
 
C

Carl Rapson

Put it in the Format event of the report's Detail section. Something like
this:

If Me.Discharge_Reason = "Contract Change" Then
Me.Discharge_Reason.Visible = True
Else
Me.Discharge_Reason.Visible = False
End If

Carl Rapson
 
A

AccessNeophyte

I'm self-teaching on Access as I develop a client tracking database
for my facility. I'm probably going to say this wrong, but here goes.
I have a report where I only want to have a particular field
(control?) visible if the data in the field it is boud to says a
specific thing.
The control is in the Detail section of the report, and it's called
Discharge Reason" It refers to a field with the same name in the
query the report is bound to. There are 8 possible entries for this
field, plus "Contract Change" That's the only one I want to see in my
report.
I only want to have the field "Discharge Reason" visible when the data
is "Contract Change"
Do I put this in the properties of the control? If so, where?
Thanks,
Access Neophyte

You can use code to make the control Visible or not, but it is just as
easy to use an unbound text control.
Set it's Control Source to:

=IIf([Discharge Reason] = "Contract Change",[Discharge Reason],"")

Make sure the name of this control is NOT "Discharge Reason".
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail- Hide quoted text -

- Show quoted text -

Thanks so much! It worked great!
Access Neophyte
 
A

AccessNeophyte

I'm self-teaching on Access as I develop a client tracking database
for my facility. I'm probably going to say this wrong, but here goes.
I have a report where I only want to have a particular field
(control?) visible if the data in the field it is boud to says a
specific thing.
The control is in the Detail section of the report, and it's called
Discharge Reason" It refers to a field with the same name in the
query the report is bound to. There are 8 possible entries for this
field, plus "Contract Change" That's the only one I want to see in my
report.
I only want to have the field "Discharge Reason" visible when the data
is "Contract Change"
Do I put this in the properties of the control? If so, where?
Thanks,
Access Neophyte

You can use code to make the control Visible or not, but it is just as
easy to use an unbound text control.
Set it's Control Source to:

=IIf([Discharge Reason] = "Contract Change",[Discharge Reason],"")

Make sure the name of this control is NOT "Discharge Reason".
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail- Hide quoted text -

- Show quoted text -

Thanks so much! It worked great!
Access Neophyte
 

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