A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

make a text box visible and non visible



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2008, 01:48 PM posted to microsoft.public.access.forms
umpire_43
external usenet poster
 
Posts: 13
Default make a text box visible and non visible

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks
  #2  
Old March 4th, 2008, 03:07 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default make a text box visible and non visible

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

  #3  
Old March 4th, 2008, 03:17 PM posted to microsoft.public.access.forms
umpire_43
external usenet poster
 
Posts: 13
Default make a text box visible and non visible

Hi thanks for your quick reply.

Im using dlooup under the control source to pull the information into the
text box. So i want to replace HELP ( in formula below)....will that work? I
hope that makes sense?

=IIf(DLookUp("[Quarterly Charge -Back]","Target Data"," [code] ='" &
[Basis 1 Code] & "'")=0,"help",DLookUp("[Quarterly Charge -Back]","Target
Data"," [code] ='" & [Basis 1 Code] & "'"))

Thanks

"Klatuu" wrote:

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

  #4  
Old March 4th, 2008, 03:27 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default make a text box visible and non visible

No, the code would not work there. Using this as the control source:
=DLookUp("[Quarterly Charge -Back]","[Target Data]"," [code] ='" &
Me![Basis 1 Code] & "'")

The use the code I posted earlier in the Form Current event. Note I put
brackets around Target Data. When you put characters in a name that should
not be in a name (like a space), you need to bracket it so Access doesn't get
confused. You code assumes:
You want to return the value in a field (poorly) named [Quarterly Charge
-Back]
The field is in a domain (table/query) (poorly) named [Target Data]
You are looking for a record where the field [code] is equal to a control on
your form (poorly) named [Basis 1 Code]

--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi thanks for your quick reply.

Im using dlooup under the control source to pull the information into the
text box. So i want to replace HELP ( in formula below)....will that work? I
hope that makes sense?

=IIf(DLookUp("[Quarterly Charge -Back]","Target Data"," [code] ='" &
[Basis 1 Code] & "'")=0,"help",DLookUp("[Quarterly Charge -Back]","Target
Data"," [code] ='" & [Basis 1 Code] & "'"))

Thanks

"Klatuu" wrote:

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

  #5  
Old March 4th, 2008, 04:18 PM posted to microsoft.public.access.forms
umpire_43
external usenet poster
 
Posts: 13
Default make a text box visible and non visible

Hi Dave,

I'm real sorry being a pest. Where am i suppose create the current event.
I don't see anything in the property dialog box that would get me started
when i right click on txtchargeback text box.

Am i missing something here?

Sorry

Keith



"Klatuu" wrote:

No, the code would not work there. Using this as the control source:
=DLookUp("[Quarterly Charge -Back]","[Target Data]"," [code] ='" &
Me![Basis 1 Code] & "'")

The use the code I posted earlier in the Form Current event. Note I put
brackets around Target Data. When you put characters in a name that should
not be in a name (like a space), you need to bracket it so Access doesn't get
confused. You code assumes:
You want to return the value in a field (poorly) named [Quarterly Charge
-Back]
The field is in a domain (table/query) (poorly) named [Target Data]
You are looking for a record where the field [code] is equal to a control on
your form (poorly) named [Basis 1 Code]

--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi thanks for your quick reply.

Im using dlooup under the control source to pull the information into the
text box. So i want to replace HELP ( in formula below)....will that work? I
hope that makes sense?

=IIf(DLookUp("[Quarterly Charge -Back]","Target Data"," [code] ='" &
[Basis 1 Code] & "'")=0,"help",DLookUp("[Quarterly Charge -Back]","Target
Data"," [code] ='" & [Basis 1 Code] & "'"))

Thanks

"Klatuu" wrote:

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

  #6  
Old March 4th, 2008, 04:51 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default make a text box visible and non visible

Select the form. Use the small square button in the upper left hand corner
of the form in form design. Open the properties dialog, select events, and
look for the Current event.
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi Dave,

I'm real sorry being a pest. Where am i suppose create the current event.
I don't see anything in the property dialog box that would get me started
when i right click on txtchargeback text box.

Am i missing something here?

Sorry

Keith



"Klatuu" wrote:

No, the code would not work there. Using this as the control source:
=DLookUp("[Quarterly Charge -Back]","[Target Data]"," [code] ='" &
Me![Basis 1 Code] & "'")

The use the code I posted earlier in the Form Current event. Note I put
brackets around Target Data. When you put characters in a name that should
not be in a name (like a space), you need to bracket it so Access doesn't get
confused. You code assumes:
You want to return the value in a field (poorly) named [Quarterly Charge
-Back]
The field is in a domain (table/query) (poorly) named [Target Data]
You are looking for a record where the field [code] is equal to a control on
your form (poorly) named [Basis 1 Code]

--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi thanks for your quick reply.

Im using dlooup under the control source to pull the information into the
text box. So i want to replace HELP ( in formula below)....will that work? I
hope that makes sense?

=IIf(DLookUp("[Quarterly Charge -Back]","Target Data"," [code] ='" &
[Basis 1 Code] & "'")=0,"help",DLookUp("[Quarterly Charge -Back]","Target
Data"," [code] ='" & [Basis 1 Code] & "'"))

Thanks

"Klatuu" wrote:

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

  #7  
Old March 4th, 2008, 05:04 PM posted to microsoft.public.access.forms
umpire_43
external usenet poster
 
Posts: 13
Default make a text box visible and non visible

Hi Dave,

thank you so much. I wouldn't have looked there at all. Hopefully it will
work now for me.

thanks again
keith

"Klatuu" wrote:

Select the form. Use the small square button in the upper left hand corner
of the form in form design. Open the properties dialog, select events, and
look for the Current event.
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi Dave,

I'm real sorry being a pest. Where am i suppose create the current event.
I don't see anything in the property dialog box that would get me started
when i right click on txtchargeback text box.

Am i missing something here?

Sorry

Keith



"Klatuu" wrote:

No, the code would not work there. Using this as the control source:
=DLookUp("[Quarterly Charge -Back]","[Target Data]"," [code] ='" &
Me![Basis 1 Code] & "'")

The use the code I posted earlier in the Form Current event. Note I put
brackets around Target Data. When you put characters in a name that should
not be in a name (like a space), you need to bracket it so Access doesn't get
confused. You code assumes:
You want to return the value in a field (poorly) named [Quarterly Charge
-Back]
The field is in a domain (table/query) (poorly) named [Target Data]
You are looking for a record where the field [code] is equal to a control on
your form (poorly) named [Basis 1 Code]

--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi thanks for your quick reply.

Im using dlooup under the control source to pull the information into the
text box. So i want to replace HELP ( in formula below)....will that work? I
hope that makes sense?

=IIf(DLookUp("[Quarterly Charge -Back]","Target Data"," [code] ='" &
[Basis 1 Code] & "'")=0,"help",DLookUp("[Quarterly Charge -Back]","Target
Data"," [code] ='" & [Basis 1 Code] & "'"))

Thanks

"Klatuu" wrote:

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

  #8  
Old March 4th, 2008, 05:08 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default make a text box visible and non visible

I hope so, too. Post back if you have any questions.
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi Dave,

thank you so much. I wouldn't have looked there at all. Hopefully it will
work now for me.

thanks again
keith

"Klatuu" wrote:

Select the form. Use the small square button in the upper left hand corner
of the form in form design. Open the properties dialog, select events, and
look for the Current event.
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi Dave,

I'm real sorry being a pest. Where am i suppose create the current event.
I don't see anything in the property dialog box that would get me started
when i right click on txtchargeback text box.

Am i missing something here?

Sorry

Keith



"Klatuu" wrote:

No, the code would not work there. Using this as the control source:
=DLookUp("[Quarterly Charge -Back]","[Target Data]"," [code] ='" &
Me![Basis 1 Code] & "'")

The use the code I posted earlier in the Form Current event. Note I put
brackets around Target Data. When you put characters in a name that should
not be in a name (like a space), you need to bracket it so Access doesn't get
confused. You code assumes:
You want to return the value in a field (poorly) named [Quarterly Charge
-Back]
The field is in a domain (table/query) (poorly) named [Target Data]
You are looking for a record where the field [code] is equal to a control on
your form (poorly) named [Basis 1 Code]

--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi thanks for your quick reply.

Im using dlooup under the control source to pull the information into the
text box. So i want to replace HELP ( in formula below)....will that work? I
hope that makes sense?

=IIf(DLookUp("[Quarterly Charge -Back]","Target Data"," [code] ='" &
[Basis 1 Code] & "'")=0,"help",DLookUp("[Quarterly Charge -Back]","Target
Data"," [code] ='" & [Basis 1 Code] & "'"))

Thanks

"Klatuu" wrote:

What you want to do is easy enough, but how will you get data into the text
box?

Based on your descripton, I would use the form Current event:

Me.MyTextBox.Visible = Me.MyTextBox 0
--
Dave Hargis, Microsoft Access MVP


"umpire_43" wrote:

Hi there,

Hopefully, someone can help me with this.

Is there a way of making a text box visible through a if then statement on a
form if it meets a certain condition. ( using Control Sources function on the
property box)

for example.

Make the text box visible if not equal to zero else change the visible
property to not being visible.

Or is there another way of accomplishing the same thing using the property
box conditions or something else


I hope this makes sense.

Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.