| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
|||
|
|||
|
Reports in a Combo box (Simple)
Wasn't sure if this was a form or reports question, but eitherway, how do you put reports into a combo box? I've been able to successfully google how to look up records from a table in a combo box, now I need to be able to give a drop down list showing several reports
In my modify staff form, I want to show all reports that are based on staff, and when they are selected the reports are executed. Currently this totals a grand total of 1 report. But the ability for this to auto update when I add more staff reports would be useful However, as a patchup job if someone simply knew how to do it without auto-updating the cbo. Thanks! |
| Sponsored Links |
|
#2
|
||||
|
||||
|
Re: Reports in a Combo box (Simple)
I like Bob Larson's list box sample (which can be done using a combo as well) and you can modify it so that it fits your situation. But essentially by using a certain prefix the report will automatically be added to the list.
|
|
#3
|
|||
|
|||
|
Re: Reports in a Combo box (Simple)
Looks like exactly what I want, (I'd start all mine with RptStaff_ or the like)
However I don't quite understand the query he uses as the row source of the list box. I understand that a field has to contain the criteria "rpt_" but I don't know or understand what ''Left([Name],4)'' means. That sysObjects database is so confusing! I understand Name is a field in it, which describes the type of object (perhaps?) but other than that..totally at a loss Do I even need to understand it? Could I just copy and past straight from it into my database? |
|
#4
|
||||
|
||||
|
Re: Reports in a Combo box (Simple)
The Left part gets the first 4 characters from the name and the criteria of
rpt_ means that if that left 4 characters is rpt_ then it will include it in the list. If not, it won't. So to have the report show up in the list you just name your report rpt_WHATEVER HERE and then it will show up in the list (without the rpt_ part). You could copy it in and use it. |
|
#5
|
|||
|
|||
|
Re: Reports in a Combo box (Simple)
this is a shame! tried it with a list box first, worked a charm, then tried it with a combo box and for some reason with a combo box it doesn't block out the "rpt_"
this poses a little problem as the list box demands more space, where as a combo box i expandable any ideas? Or should I bite the bullet and use list boxes? |
|
#6
|
||||
|
||||
|
Re: Reports in a Combo box (Simple)
Quote:
First, use the same row source as the list box. Second, set the COLUMN COUNT to 2 and the Bound Column to 1. |
|
#7
|
||||
|
||||
|
Re: Reports in a Combo box (Simple)
Actually, you could just select the list box while in design view and go to FORMAT > CHANGE TO > Combo Box.
|
|
#8
|
|||
|
|||
|
Re: Reports in a Combo box (Simple)
I thought that too, but I can't seem to see where that is, not sure if the option is available (using access 2007 by the way)
|
|
#9
|
||||
|
||||
|
Re: Reports in a Combo box (Simple)
Oh, in 2007 you select the control and right-click and you should see the CHANGE TO on the popup menu.
|
|
#10
|
|||
|
|||
|
Re: Reports in a Combo box (Simple)
Excellent it works! Thanks!
|
| Sponsored Links |
![]() |
| Tags |
| auto open, auto update, combo box, reports |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cascading Combo Box - Assistance | JPW | General | 2 | 05-07-2008 06:18 PM |
| Combo Box on Toolbar | shadow9449 | General | 2 | 10-02-2007 09:01 AM |
| Cascading Combo Box Problem | clf | Forms | 1 | 06-23-2004 06:07 PM |
| Problem closing a form with a combo box linked to a list box. | Essendon | Forms | 1 | 04-10-2002 02:37 AM |
| Combo Box to Print/Preview Reports | LisaP | Forms | 3 | 01-12-2001 09:08 AM |