Results 1 to 2 of 2

Thread: OpenReport code

  1. #1
    2 Star Lounger
    Join Date
    Apr 2008
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am trying to write code to open a report where the value of one field in the query is -1.

    I'm close but I do not thin I have the code quite right.

    DoCmd.OpenReport "rptLabels5161US", acPreview, "PrintLabel =-1"

    Thanks for the help.

    Paul

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You need one extra comma:

    DoCmd.OpenReport "rptLabels5161US", acViewPreview, , "PrintLabel =-1"

Posting Permissions

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