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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing "Yes" for yes/no field instead of a checkbox

Status
Not open for further replies.

jprochelle

Technical User
Jun 18, 2004
36
0
0
US
I have a report with a yes/no field. In report form, it looks fine. But when I export to work the checkbox disappears and you can't view the data. How can I get the report to print "Yes" if the checkbox is not null?
 
I am trying to get the checkbox to print the words "Yes or No" instead of the checkbox being displayed. But it is not allowing me to do that, for whatever reason.

When I click on properties, there is no option for me to chose yes or no in the formatting section...
 
What if you create a text box in your report and use code to write yes or no depending on the value in the checkbox's table entry?

To do that, add code to the main report's Detail area's Event On Format property. I'd think it'd be something like:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

  If (me.yourCheckbox.value=-1 Then  ' -1 = checked
      me.yesTextBox.value="Yes"
  Else   ' 0 = not checked
      me.yesTextBox.value="No"
  End If

End Sub
 
In your report which I think was created by a wizzard dlete the check box and put a text box. have as its control source your yes/no field and format as yes/no.
Eddie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top