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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|