Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164

    Creating a report with a drop down selection to filter on

    I have created a report that shows me my inventory grouped by customer first and then by BOL. The report runs from a query that has a paramter on BOL so that when the report is ran it ask for the BOL number.



    I would like to know if it is possible to create the report giving the user the ability to select from a list of BOL numbers instead of keying in the one they want?

    I have tried using a combo box but it does not display when I run my repot?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What do you have in the AfterUpdate event of the ComboBox?

  3. #3
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    I do not have anything in the UpdateAfter field. I have not used those fields before for anything.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Use the Command Button to create a Button that opens a Report and then look at the Click event. I have to go to a meeting right now but I'll check in when I get back. If the code in the Click event of the CommandButton were in the AfterUpdate event of a ComboBox, what would happen?

  5. #5
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    Use the Command Button to create a Button that opens a Report and then look at the Click event. I have to go to a meeting right now but I'll check in when I get back. If the code in the Click event of the CommandButton were in the AfterUpdate event of a ComboBox, what would happen?
    I am sorry Allan, When I look at the After Update field on the event tab I see [event procedure] showing in brackets. If I click the lookup botton I see code but I have to be honest. I know nothing about VB Code. If you want to see this code I can copy and past it but it is all greek to me. If I am getting in over my head with trying to accomplish this task just let me know.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Well, in "over your head" is really a personal opinion. It is really pretty easy with a little VBA. Go ahead and post the Click event code of the CommandButton and the SQL for the RowSource of the ComboBox. We'll be able to put them together for you and you will see the value of learnig a bit of VBA.

  7. #7
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    Well, in "over your head" is really a personal opinion. It is really pretty easy with a little VBA. Go ahead and post the Click event code of the CommandButton and the SQL for the RowSource of the ComboBox. We'll be able to put them together for you and you will see the value of learnig a bit of VBA.
    Alright RG. I welcome the opportunity to learn a little VB. However, I an not sure why this is happening now.
    I open my report in Design View and add either a combo box or a command button. Once this is done, I go to the properties of the box or button and click on the [event] tab and it is blank. I can not figure out why it would be blank. The event tab is not showing anything.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    ComboBoxes are for Forms, not Reports. Reports are a piece of paper.

  9. #9
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    ComboBoxes are for Form, not Reports. Reports are a piece of paper.
    I thought that might be the case. I have a form created already for my inventory that allows me to select from a list of BOL #'s so that the user can enter the inventory by BOL. This works fine. I was hoping there was a way to run a report that allows a user to select from a list the value that want the report to filter on. Is there a way to accomplish this?

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Yes, if you run the report from a form with a ComboBox.

  11. #11
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    Yes, if you run the report from a form with a ComboBox.
    Ok, this is where I may need a little direction. I open the form with the combo box in desig view and add a command button that prints the report that I created for reporting on one BOL. However, it still asks for the BOL number. This is where I assume I will need to know a little VB so that I can edit the procedure that runs on the event tab so that it automatically attaches the report to the record that I am on.

    Is this what needs to be done to accomplish this task?

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It sounds like the query that the Report is based on is asking for the BOL number. Are you always going to *only* want a report on just one BOL #?

  13. #13
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    It sounds like the query that the Report is based on is asking for the BOL number. Are you always going to *only* want a report on just one BOL #?
    Well, I have several reports, many of wich are not filtered. However, I have one report in which I want to run the report filtered on only ONE Bill of Ladding (BOL).
    Instead of having to know the entire BOL # wich could be as long as 15 digits I was hoping that the user could just choose from a list. Or maybe I could set the report to run based on BOL that is selected in the form when entering inventory for that BOL.

    Does that help?

    Bare with me while I try and ansser your questions. Sometimes I may not know exactly what you are fishing for but I will do my best.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You're doing just fine. Filters work really well with Reports and the WhereCondition argument of the OpenReport command simply applies a filter to the RecordSource of the report. Therefore I would create a generic query for the report that return all records and apply a filter with the WhereCondition argument. If it is possible, I would use a ComboBox to select a BOL and use the AfterUpdate event of the cbo to run a preview of the report which can be then printed from the preview if the user desires.

  15. #15
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Quote Originally Posted by RuralGuy View Post
    You're doing just fine. Filters work really well with Reports and the WhereCondition argument of the OpenReport command simply applies a filter to the RecordSource of the report. Therefore I would create a generic query for the report that return all records and apply a filter with the WhereCondition argument. If it is possible, I would use a ComboBox to select a BOL and use the AfterUpdate event of the cbo to run a preview of the report which can be then printed from the preview if the user desires.
    Ok, I think I am following you but I need to have one thing clarified. First, I do have a combo box on my form where the user selects a BOL and it finds and changes the inventory record based on the BOL that is selected.

    I am not sure at this point if you are asking me to update the event procudure of the form to apply the filter, or to add a command button that previews the report and edit the event procudures of the button.

    Either way, I am not clear on how to create the where clause needed to filter the report based on the record I am displaying at the time.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem Creating Report
    By Access_CFO in forum Reports
    Replies: 3
    Last Post: 04-01-2009, 01:08 PM
  2. Report Detail Entry Selection Problem
    By Joe in forum Reports
    Replies: 0
    Last Post: 02-02-2009, 06:55 PM
  3. creating a report in this manner
    By jiwatramani in forum Reports
    Replies: 1
    Last Post: 11-07-2008, 11:39 PM
  4. Replies: 1
    Last Post: 12-06-2006, 05:32 PM
  5. How about creating a drop down menu in a report?
    By beastmaster in forum Access
    Replies: 2
    Last Post: 12-29-2005, 01:01 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