Results 1 to 3 of 3

Thread: Error trying to print records of current form page only! [Resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member techwizz's Avatar
    Join Date
    Apr 2005
    Location
    U.S.A.
    Posts
    246

    Exclamation Error trying to print records of current form page only! [Resolved]

    Hello vbforums.com,

    I am trying to print only the current data from a form in access. Includes data from a subform.

    Ive done it before and am actually using the same code.. with no success. Maybe someone can help...

    The report to be called is name Patient

    I want to print only current PatID ... but its not working as i said.

    I use the following code.

    VB Code:
    1. Dim strDocName As String
    2.     Dim strWhere As String
    3.    
    4.     strWhere = "[PatID]=" & Me.PatID
    5.     strDocName = "Patient"
    6.     DoCmd.OpenReport strDocName, acPreview, , strWhere

    It keeps asking me for the PatID.... even though it is plainly displayed on the form.

    Also with some changes tells me i have to many (

    Heeeelp....

    I attatched a file.
    Attached Files Attached Files
    Last edited by techwizz; Jun 21st, 2005 at 10:04 PM. Reason: Finishes

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