If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
filter crosstab by listbox selection
I'm just curious if it is possible to filter a crosstab query (presented in a
listbox) by a selection in another listbox on a different form. I try inserting the criteria - [forms]![search]![list15] - into the criteria section on the QBE builder, but when i run the form by itself it says access does not realize [forms]![search]![list15] as a valid expression... when ran after its listbox 'parent' form, nothing appears. Any help or suggestions would be great! |
#2
|
|||
|
|||
filter crosstab by listbox selection
You must declare this parameter in your crosstab query.
Open the query in design view. Choose Parameters from the Query menu. In the dialog, enter: [forms]![search]![list15] Long The data type in the dialog should match the data type of the field you are placing this expression under. For example, if it goes under a Text type field, you declare Text instead of Long in the dialog. Note that this approach will not work for a multi-select list box. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "polisci grad" wrote in message ... I'm just curious if it is possible to filter a crosstab query (presented in a listbox) by a selection in another listbox on a different form. I try inserting the criteria - [forms]![search]![list15] - into the criteria section on the QBE builder, but when i run the form by itself it says access does not realize [forms]![search]![list15] as a valid expression... when ran after its listbox 'parent' form, nothing appears. Any help or suggestions would be great! |
#3
|
|||
|
|||
filter crosstab by listbox selection
Thanks Allen, I've done this now, and things show up in the child listbox but
they are not specific to the selection in the parent listbox. It just reveals all of the records. In this instance, the data is text. "Allen Browne" wrote: You must declare this parameter in your crosstab query. Open the query in design view. Choose Parameters from the Query menu. In the dialog, enter: [forms]![search]![list15] Long The data type in the dialog should match the data type of the field you are placing this expression under. For example, if it goes under a Text type field, you declare Text instead of Long in the dialog. Note that this approach will not work for a multi-select list box. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "polisci grad" wrote in message ... I'm just curious if it is possible to filter a crosstab query (presented in a listbox) by a selection in another listbox on a different form. I try inserting the criteria - [forms]![search]![list15] - into the criteria section on the QBE builder, but when i run the form by itself it says access does not realize [forms]![search]![list15] as a valid expression... when ran after its listbox 'parent' form, nothing appears. Any help or suggestions would be great! |
#4
|
|||
|
|||
filter crosstab by listbox selection
never mind, fixed it....
by the way, if i wanted to make this work for multiselect listbox, would this be possible? I have a sample of code i found for this at your website under "Use a multiselect list box to filter a report". Thanks for the help! "Allen Browne" wrote: You must declare this parameter in your crosstab query. Open the query in design view. Choose Parameters from the Query menu. In the dialog, enter: [forms]![search]![list15] Long The data type in the dialog should match the data type of the field you are placing this expression under. For example, if it goes under a Text type field, you declare Text instead of Long in the dialog. Note that this approach will not work for a multi-select list box. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "polisci grad" wrote in message ... I'm just curious if it is possible to filter a crosstab query (presented in a listbox) by a selection in another listbox on a different form. I try inserting the criteria - [forms]![search]![list15] - into the criteria section on the QBE builder, but when i run the form by itself it says access does not realize [forms]![search]![list15] as a valid expression... when ran after its listbox 'parent' form, nothing appears. Any help or suggestions would be great! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
multiple selection in a listbox | JOM | General Discussion | 5 | August 29th, 2006 08:57 PM |
Print Search Listbox Results in Report Filter Preview ... HELP!!! | [email protected] | Setting Up & Running Reports | 0 | January 27th, 2006 07:34 PM |
listbox selection | asa | General Discussion | 1 | June 4th, 2005 02:52 PM |
Update a Listbox by Combo selection | dogpigfish | Using Forms | 1 | May 17th, 2005 06:43 PM |