Results 1 to 8 of 8

Thread: Checkboxs: Check mark instead of 1 ??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Question

    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.

  2. #2
    New Member
    Join Date
    Aug 2000
    Posts
    3
    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

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226
    Thanx to both of you.

    That's what I thought! But I thought somebody might have a different idea.

    Again, Thanx.


  5. #5
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    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.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  6. #6
    New Member
    Join Date
    Sep 2000
    Posts
    5
    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?

  7. #7
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    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.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  8. #8
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    '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
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width