Text Box Linking and Auto Fill

  • Thread starter Thread starter eschlep via AccessMonster.com
  • Start date Start date
E

eschlep via AccessMonster.com

I have text boxes on a form and it is bounded to a textbox on a report. How
can i make it so that i can type y and it shows up yes on the form and n it
shows up no. I would also like it so if there is nothing typed in the box
the text box on the report is not shown at all. Thanks
 
Open the report in design mode.
If your textbox is named Text1 (in the report) for example...Now I mean the
actual name of the textbox control, not the field it is linked to. Right
clcik on the textbox and click Properties. Go to the ALL tab and look at the
Name property.
Next, Right click on the bar named Detail. Select Build Event, then Code
Builder.
Enter code similar to the following:

Text1.Visible = True
Select Case [Text1]
Case "N"
Text1 = "No"
Case "Y"
Text1 = "Yes"
Case IsNull
Text1.Visible = False
Case ""
Text1.Visible = False
End Select



jmonty
 
I tried this and i get a runtime error that says that i cant assign a value
to this object. How can i fix this
jmonty said:
Open the report in design mode.
If your textbox is named Text1 (in the report) for example...Now I mean the
actual name of the textbox control, not the field it is linked to. Right
clcik on the textbox and click Properties. Go to the ALL tab and look at the
Name property.
Next, Right click on the bar named Detail. Select Build Event, then Code
Builder.
Enter code similar to the following:

Text1.Visible = True
Select Case [Text1]
Case "N"
Text1 = "No"
Case "Y"
Text1 = "Yes"
Case IsNull
Text1.Visible = False
Case ""
Text1.Visible = False
End Select

jmonty
I have text boxes on a form and it is bounded to a textbox on a report. How
can i make it so that i can type y and it shows up yes on the form and n it
shows up no. I would also like it so if there is nothing typed in the box
the text box on the report is not shown at all. Thanks
 
Back
Top