Results 1 to 5 of 5
  1. #1
    enquiries is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Location
    Samoa
    Posts
    69

    Populating a report and sub-report based on the primary key (filter)

    Hi

    Trying to create a report that will be populated based on an ID selected in the combo box in the header. The reason behind this is because I only want to print an individual record at a time and only selected individual records. So this will be based on a query where the query will take the value given in the combo box as criteria. Problem I encountered is that when I try to create the combo box it doesn't show the values (I've done this before with forms etc and it's worked) but I have an inkling it is because I'm trying to use a primary key as opposed to a foreign key. The only reason why I'm not using the foreign key is because only some records will have those fields so I need the primary key to include ALL records.



    Any help/readings/suggestions much appreciated

    Thanks!!!

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    If the combo does not show your value(s) it is most likely because you do not have your Column Count and Widths set correctly.

  3. #3
    enquiries is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Location
    Samoa
    Posts
    69
    Thanks for replying, I actually just tested it in a form and it work perfectly fine. But it's when I create it in a report that I can't see it (I use the wizard). I've double checked the properties everything is set to visible, width is okay, even when I put borders around it, it just appears as a box no values and doesn't look like a combo box (no drop down arrow)

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    If it works on the form, then use the same code for your Report.

  5. #5
    enquiries is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Location
    Samoa
    Posts
    69
    I meant the combo box using the primary key, I'm not sure why a combo box won't show it's values in a report? Maybe it's the report properties. I'll play around with it.

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

Similar Threads

  1. VBA for Report Filter based on Form Checkboxes
    By Kirsti in forum Programming
    Replies: 11
    Last Post: 04-23-2014, 04:52 PM
  2. Filter report based on SUM value in box
    By sashless in forum Reports
    Replies: 15
    Last Post: 12-19-2013, 11:54 AM
  3. Replies: 2
    Last Post: 05-10-2013, 03:37 PM
  4. Replies: 5
    Last Post: 02-05-2013, 01:18 PM
  5. Replies: 3
    Last Post: 10-31-2011, 04:54 PM

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