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!

Checkbox and visible property

Status
Not open for further replies.

mikelev

Technical User
Mar 23, 2004
223
US
I have a bound form that has 8 checkboxes. I have a report based on the same table with a predifined format that cannot be changed.

A user checks the "checkbox" on the form only if the condition is met. I have 2 columns Yes and No on the report. I am trying to avoid having 2 checkboxes for each condition (Yes and No)on my form, but need the "NO" (if not checked)to be indicated on the report as well as the "YES" (if checked on the form).

Was looking for something like this:

'PROPSHUFF is the forms condition checkbox
Private Sub Report_Activate()
If Not IsNull(Me.PROPSHUFF) Then
Me.Check119.Visible = False
End If
End sub



Any ideas?


Cheers,
 
Hello MikeLev,

This will get you going again. Add the following function to a module. YN will be the value passed into the function. YesNo will be the value passed out.

Public Function YesNo(YN As Boolean) As String

If YN = True Then
YesNo = "yes"
Else
YesNo = "No"
End If

Then on your report, replace checkboxes with unbound text boxes and place the following in each of the text box's control source:

=YesNo([fldA])

fldA will be whatever Boolean (yes-No) field you want as your data source.

Cheers,
Bill

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top