Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Record in Form & Report

    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.

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record in Form & Report

    You could use the CurrentRecord property of the form as the Where Condition when opening the Report. You could do something like:<pre>DoCmd.OpenReport "<YourReportName>", acViewPreview, , "[<YourFieldName>]=" & Me.CurrentRecord</pre>

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

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    284
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record in Form & Report

    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

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record in Form & Report

    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 <img src=/S/eyeout.gif border=0 alt=eyeout width=15 height=15>

Posting Permissions

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