Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Oct 2010
    Location
    Austin, TX
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    How do you pass the current record ID of a record from a form to a report?  
    I can launch the report but the ID value is not correct.  
    Note:  The report's data source is linked to the same table as the form.

  2. #2
    Star Lounger
    Join Date
    Sep 2002
    Location
    Hastings, Sussex, England
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post
    Dave,

    there are many possible solutions. Probably the simplest is to pass the ID as part of a Where parameter. If you look at the options for Docmd.OpenReport, you will see one is a WhereCondition. Fill this with a string such as "[ID]=29", and it should work.

    Regards,

    Jules

  3. #3
    New Lounger
    Join Date
    Oct 2010
    Location
    Austin, TX
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Alright, thats working. It turns out I had reset the query and report datasource.
    Now, how do I pass the value of the current record (on the form) to that ID value?


    ahhh...."ID = " + Str(MyID)

    Thanks Jules!!

Posting Permissions

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