Results 1 to 6 of 6
  1. #1
    Simonhtc4 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    30

    Open a Single record in a Report

    Hi Guys, need help with try to open a single Plantation report.



    On the home page you have a Run Certificates button, click that and it will take you to the Certificates_frm page.
    When you click the Run All certificates it runs the report Certificates_rpt for all in the Bidwell_tbl.

    What i want to do is select 1 Record from the Bidwell_tbl and open that single record in the Certificates_rpt.

    I have been trying to get this to work but i keep failing :-(

    is there anyone out there that help with a fix for this?

    Regards
    Simon






    Bidwell.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,899
    Exactly what have you tried and how is it failing - error message, wrong results, nothing happens?

    Why is there no code associated with the SingleCertificate form OpenReport button?

    This can be done with macro or VBA. Basically the same as the 'all certificates' code except with dynamic parameter that references the combobox.

    For VBA example review http://www.allenbrowne.com/ser-62.html

    Don't need two queries, one will serve for both reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Simonhtc4 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    30
    Hi June, im new to this and will look throught the article you have hyperlinked.

  4. #4
    Simonhtc4 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    30
    I really dont understand any of the article to be honest but ill keep having a stab at it.

  5. #5
    Simonhtc4 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    30
    Ok, Im getting there slowly but surely.

    If you open the SingleCertificate_frm and select a plantation then click run report, it will open the Certificates_rpt BUT........ it only open the report with Plantation name and does bring the data down for that specific plantation, it keeps getting the details for the rest of the report from what ever is at the top of the Certificates_qry.

    I hope this makes sense.

    I want the report to show all the details for that plantation i select for the report to run the Certificate.


    Bidwell_1.zip

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,899
    DoCmd.OpenReport "Certificates_rpt", acViewPreview, , "Plantation='" & Me.Plantation & "'", acWindowNormal

    Or you could have used Embedded Macro as you did with the 'all' button and simply apply filter criteria there in the WHERE CONDITION.

    I never use macros, only VBA.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Print Report for Single Record
    By Ryanm0085 in forum Reports
    Replies: 13
    Last Post: 05-03-2017, 08:33 AM
  2. Print out single record onto a report
    By CQCDave in forum Access
    Replies: 2
    Last Post: 04-23-2015, 06:54 AM
  3. Print out single record onto a report
    By CQCDave in forum Access
    Replies: 14
    Last Post: 01-08-2015, 12:55 PM
  4. Email a single record report
    By andrewhoddie in forum Macros
    Replies: 4
    Last Post: 11-10-2014, 03:31 PM
  5. How to print a single Record's report?
    By yes sir in forum Access
    Replies: 7
    Last Post: 09-20-2010, 07:31 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