Results 1 to 2 of 2
  1. #1
    degras is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    72

    Trying to refer to a parameter value on a report

    Hi,
    I am trying to refer to a parameter value on a report, to use as part of a filename.

    Here is the code:
    DoCmd.OpenReport "Projects", acViewPreview, , , , "NoGroup"
    MyFileName = "Green Team Weekly Report - " & [Reports]![Projects].[Start Date] & ".pdf"

    "Start Date" is the parameter name. But i am getting an error:
    ms access cannot find the field "|"referred to in your expression

    How is it possible at this point in the code to refer to this parameter value?



    Thanks.

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    generically - yes. but..... sanity check time - is there multiple records sharing that control? - then the answer is no - cause it doesn't know which one to use....

    if there is only one record, it should work if the Report is fully opened.....

    so that value is coming from the record source - have you attempted to reference the record source rather than the report?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-15-2011, 05:24 AM
  2. Query Parameter not udpating Report
    By krutoigoga in forum Reports
    Replies: 9
    Last Post: 04-30-2010, 06:46 AM
  3. Report with Parameter Query/Form
    By maggioant in forum Reports
    Replies: 0
    Last Post: 10-09-2009, 09:48 AM
  4. Replies: 3
    Last Post: 02-27-2009, 08:07 PM
  5. Replies: 4
    Last Post: 01-05-2006, 02:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums