Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set TextBox Invisible Via Formula

Status
Not open for further replies.

jkb17

Programmer
Nov 27, 2000
156
US
Hello,

I have an access report created off of a linked SQL Server DB table. There is a boolean\bit flag that should allow a certain two textboxes to be printed. If the flag is true then I print out some text else I print out a blank.

This works fine.

If the flag is true for subsequent textbox it is to print out a number (a dollar amount) else a blank. I am getting an #Error on the formula for all true values but its not display on False (which is correct).

I think that my #Error has to do with the two different types of data I'm dealing with. My output is a numeric\currency if True but a blank string if false.

Can anyone help me with a workaround to suppress a field based on a distinct boolean flag column?

Thanks in advance

Jim
 
Jim,

Instead of forcing a value, try using the Visible property. Use something like this in the On Format event of the section where the text box resides:
Code:
If [Flag] = True Then
   Me.txtTextBox.Visible = True
Else
   Me.txtTextBox.Visible = False
End If

Hoc nomen meum verum non est.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top