Results 1 to 3 of 3
  1. #1
    mrs.clapp3 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1

    Linking(?) a form to a report -- Pretty new to Access

    Okay, so I have to use Access for work... I don't have much formal training in it but I'm pretty good at teaching myself and figuring things out in it... However, for the life of me, I cannot get past this road block!!!



    I work for a manufacturing company and I enter all of our Job Orders in to my Access Database, which then I use to track each job and print a "Production Schedule"... When we get a new job that needs to be entered I open up the "Order Entry" form to enter the information... Because we keep all previous jobs in the database even after they're completed, I have to specify which jobs (all current jobs) show up on the "Production Schedule"... I do this with a 'check box'... Then when I open the Production Schedule Report, only the jobs with checked check boxes filter and show up.

    Well I have a second check box in my form that, years ago, if checked would show up on a different schedule report... Well they no longer use that report so they deleted it, but didn't delete the check box on the form.

    I would like to use that second check box again... I have already made the report that I want the second check box to be used for, but I cannot figure out how to set it so that if Checkbox 1 is checked it shows up on the "Production Schedule" report, and if Checkbox 2 is checked it shows up on my new "Shipping Details" report...

    Sorry it's so long, but can someone please help me out??? It would make my life so much easier at work to not have to track the same job over multiple programs!!! Thank you!

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    Open the first report (Production Schedule) in design view and look at the record source; notice how it makes reference to the checkbox 1 control. Now open your new report in design view and add a similar where clause to its record source, but now referencing checkbox 2 instead. You might also want to look at the code behind the button that opens the report as the WHERE clause might be there instead of the report record source.

    Cheers,
    Vlad

  3. #3
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    the query that pulls the report, would look at the checkbox on the form

    select * from table where [field] = forms!myForm!chkBox

    (IF theres a field you want to pull from the table)
    if not a field, but just a flag to pull a 2nd report,
    on the button click for the report:

    docmd.openreport "report1"
    if me.chkBox.value then docmd.openreport "report2"

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

Similar Threads

  1. Replies: 24
    Last Post: 04-02-2015, 07:34 AM
  2. Replies: 2
    Last Post: 07-11-2014, 09:43 PM
  3. Replies: 4
    Last Post: 04-06-2014, 09:08 AM
  4. Replies: 3
    Last Post: 03-30-2012, 02:02 PM
  5. Pretty Form Header - What is it?
    By trb5016 in forum Forms
    Replies: 3
    Last Post: 06-21-2010, 08:58 AM

Tags for this Thread

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