Results 1 to 4 of 4
  1. #1
    CRobledo is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    26

    combo box in form to pull report based on month

    I need help, I have a form that I want to make where you select a month from a combo box "Jan, Feb, Mar ect" and the click on a command button to preview a report based on the month selected. The records are imputed in a table named "Sales imput" in the format of mm/dd/yyyy for every day on the year one record per day. I already made the report but it displays all the records for all the months its named "Monthly Sales rpt".I just want it to display all the records for the selected month.



    if anyone has done this please let me know

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make a tMonth table:
    1, Jan
    2, Feb
    etc

    use this table in the combo box, show col 2, hide col 1, via columnwidths=0;1, and set the bound column = 1
    it also seems you will need a text box for year , txtYr (unless you are going to report on 1 year only)

    the query for the report will then pull data looking at the form items
    select * from table where month([MyDate]) = forms!myForm!cboMo and year([MyDate]) = forms!myForm!txtYr

  3. #3
    CRobledo is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    26
    sorry, I guess I should of specified I wanted the report to be filtered not necessarily make a query. I got it to do it for just selecting one record and print preview the selected report but I also want it to be able to print preview the report for all the dates in a months. I attached some screen scaps so you can see what I did. Click image for larger version. 

Name:	Capture.PNG 
Views:	11 
Size:	19.4 KB 
ID:	26663Click image for larger version. 

Name:	1.PNG 
Views:	11 
Size:	10.6 KB 
ID:	26664

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    You may get some ideas from this material by Martin Green Dynamic Reports.

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

Similar Threads

  1. Date month calculation based on combo box
    By wnicole in forum Access
    Replies: 4
    Last Post: 10-27-2013, 08:04 PM
  2. Replies: 14
    Last Post: 05-08-2013, 03:08 PM
  3. Replies: 2
    Last Post: 03-07-2013, 03:14 PM
  4. Sorting Report Based off of a Combo Box in a Form
    By datadude60 in forum Reports
    Replies: 4
    Last Post: 04-30-2012, 10:38 AM
  5. Replies: 9
    Last Post: 12-02-2011, 12:51 PM

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