Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    1

    Unanswered: printing access forms

    Hi all

    I have an access subform within a form.
    The subform displays a recordset of data that can be filtered by the user (its a basic boolean filter query).

    When the user actuall opens the form, he/she is presented with an initial recordset of data that comes from various datase tables. The user can then ilter thhe search, and thus see data based on their search criteria.

    The problem is when the user tries to print the filterd data (by simply using 'print' from the toolbar), the initial set of data - which is displayed when the form is opened, is always printed.

    hence, the user is never able to print off the data based on their searchh criteria.

    Any ideas?

    Thanks
    Manish

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465

    Re: printing access forms

    Originally posted by manishpatel100
    Hi all

    I have an access subform within a form.
    The subform displays a recordset of data that can be filtered by the user (its a basic boolean filter query).

    When the user actuall opens the form, he/she is presented with an initial recordset of data that comes from various datase tables. The user can then ilter thhe search, and thus see data based on their search criteria.

    The problem is when the user tries to print the filterd data (by simply using 'print' from the toolbar), the initial set of data - which is displayed when the form is opened, is always printed.

    hence, the user is never able to print off the data based on their searchh criteria.

    Any ideas?

    Thanks
    Manish
    Put in the form a button with this code:
    Private Sub Comando0_Click()
    On Error GoTo Err_Comando0_Click


    DoCmd.PrintOut

    Exit_Comando0_Click:
    Exit Sub

    Err_Comando0_Click:
    MsgBox Err.Description
    Resume Exit_Comando0_Click

    End Sub
    Saludos
    Norberto

  3. #3
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: printing access forms

    Originally posted by manishpatel100
    Hi all

    I have an access subform within a form.
    The subform displays a recordset of data that can be filtered by the user (its a basic boolean filter query).

    When the user actuall opens the form, he/she is presented with an initial recordset of data that comes from various datase tables. The user can then ilter thhe search, and thus see data based on their search criteria.

    The problem is when the user tries to print the filterd data (by simply using 'print' from the toolbar), the initial set of data - which is displayed when the form is opened, is always printed.

    hence, the user is never able to print off the data based on their searchh criteria.

    Any ideas?

    Thanks
    Manish
    I am not sure how you are filtering the data in the child form but there are 2 methods that I know that work the best and should allow you to print the filtered sub-form.

    You can use the built in filter between forms and subforms by using the linkmasterfield and linkchildfield property of the subform. You can use this to link the fields on the form and subform. When the user changes the parent form the child will change accordingly.

    The second method is to change the recordsource of the child form using the filter in the parent form as the Where clause of the childs SQL. This should make sure that you get the correct data printed out.

Posting Permissions

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