Results 1 to 5 of 5

Thread: Printing Form

  1. #1
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Unanswered: Printing Form

    I created a checklist.
    It is a form with a lot of labels.
    When starting up the application, I perform some tests.
    Everytime a test is finished the corresponding labels are made visible.

    For example :
    I check if a certain file is present.
    If yes --> labels are :
    file FOUND
    If not --> labels are :
    file NOT FOUND

    In the second situation I want to print out the form as it is on the screen.
    How can I do this using VBA?

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Try this:

    Me.PrintForm

    I found this doc:

    PrintForm Method


    Sends a bit-by-bit image of a UserForm object to the printer.

    Syntax

    object.PrintForm

    The object placeholder represents an object expression that evaluates to an object in the Applies To list. If object is omitted, the UserForm with the focus is assumed to be object.

    Remarks

    PrintForm prints all visible objects and bitmaps of the UserForm object. PrintForm also prints graphics added to a UserForm object.

    The printer used by PrintForm is determined by the operating system's Control Panel settings.

    This might work for you ...

  3. #3
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243
    I made a form with our companylogo on it.

    I wrote this code:

    Code:
    public sub Form_Timer()
        Me.PrintForm
    end sub
    But it gives me an error instead of a printout.
    The error says something like "unable to find method or memeber".

    What is wrong?

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Version of Access? PrintForm might not be available in earlier versions ... I got the doc from Access 2002.

  5. #5
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243
    Originally posted by M Owen
    Version of Access? PrintForm might not be available in earlier versions ... I got the doc from Access 2002.
    I use Access 2002 with VB 6.3
    The doc is also in my help, but it still doesn't work.

Posting Permissions

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