Hi all..
How can I place Check mark instead of 1 in my report?
printer.print check1.value
would yeild 1 OR o Only!
Thanx in advance for any help.
Printable View
Hi all..
How can I place Check mark instead of 1 in my report?
printer.print check1.value
would yeild 1 OR o Only!
Thanx in advance for any help.
It's becuase to VB code a checkbox is simply a boolean value - 1 means ticked 0 means unticked. The Windows controls interpret a .value = 1 as checking the box and vice versa.
What you'll need to do is to perhaps print a tick from the Wingdings font set (or another font set with a tick in it), based on the checkbox.value.
Hope this helps,
Delphy
You would need a font that has the checkmark and then
whatever key it was assigned to you would have to call
in an if statement.
Let's say you have a font called CheckMe and it is a check
mark and you assign it to the F10 key.
Code:If Check1.Value = True Then
Printer.Font = "CheckMe"
SendKeys "{F10}"
'change font back again
Printer.Font = "Original Font Whatever it was"
Else
End If
Thanx to both of you.
That's what I thought! But I thought somebody might have a different idea.
Again, Thanx.
Just a hint as well as my 2 cents: use the Marlett font. It has cool symbols like checks, x's, and more. Also, the Character Viewer utility that comes with windows can be infinitely useful.
Could you not just say:
Dim CheckYesNo As String
If Check1.Value = 1 Then
CheckYesNo = "Yes"
Else
CheckYesNo = "No"
End If
Then print the value of CheckYesNo in your report?
pipes, what lyla wanted was a CHECK MARK, not a yes or no. If a yes or no is what lyla wanted, it would work. But its not, so it doesn't. Nice try, though.
'thanks to mlewis and the idae of Marlett
'my first post is **** not enough thought went into it
'here is a working version
Code:'tried tested and true
Private Sub Command1_Click()
Dim myPFont As String
myPFont = Printer.Font
Printer.Font = "Marlett"
If Check1.Value = 1 Then
Printer.Font = "Marlett"
Printer.Print "a"
Printer.Font = myPFont
End If
End Sub