• Record in Form & Report

    Author
    Topic
    #355137

    This is probably a simple fix, but my old age must be preventing me figuring it out.

    I want to move from a specific record in an entry Form, to the same record in a Report. For example, I have “Form” record 123, and using a command button I want to open a more user friendly report of the same record, 123.

    From there I will email the nice looking Report in HTML format to the specific persons who need it. As always I appreciate the responses and assistance I receive from.

    Viewing 0 reply threads
    Author
    Replies
    • #523267

      You could use the CurrentRecord property of the form as the Where Condition when opening the Report. You could do something like:

      DoCmd.OpenReport "", acViewPreview, , "[]=" & Me.CurrentRecord

      Post back if you need help with sending it in HTML.

      HTH thumbup

      • #524425

        Mark, I am having trouble printing a single invoice. I tried this “CurrentRecord”, but I don’t get any data to print out. All I get is my report with no records. And when I tried it without using CurrentRecord I get my records printed, but they ALL print. I only want the record that I’m working on to print.

        I am creating an invoicing program for Student’s School Fees. I have the student on the form, and the invoice number is in a subform and the invoice detail is on another subform on the Student form. I want a “Print Invoice” button on the Student form to print out the invoice for that student, but I just can’t seem to get it to work. I made up a Query that pulls all the data that I need on my invoice in to one datasheet, but it lists all the invoices. How can I get just one? I hope you can help.

        Jennifer

        • #524494

          Hi Jennifer,

          Sorry for the delay in responding. You’ll need to post more information. Start with the code/macro you’re currently running to open the report. Any SQL you can post will also be helpful.

          I have a feeling the problem is caused by the different syntax one must use when dealing with the form/subform relationship.

          I”ll keep an eye out for your next post eyeout

    Viewing 0 reply threads
    Reply To: Record in Form & Report

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: