PDA

View Full Version : [SOLVED:] Return all items or selected item in parameter qry



tyrone
02-13-2007, 06:33 AM
First timer on here! I have populated a list box on an Access Form with 5 values such as:

*
E
M
N
L
Is there a way of using the "*" as the default like a wildcard (or anything else) so that a parameter qry will return all of the values from the list box (VBA or any other way is fine). The data is returned for single selections OK (No data is returned when "*" is selected) I have included the reference to the Form in the Query (eg:Forms]![Frm1]![LstBx2_P2]) I am not committed to this way - any suggestions gratefully received. Hope you can help.

tyrone

geekgirlau
02-13-2007, 08:13 PM
Try modifying your query to add "OR [Forms]![Frm1]![LstBx2_P2] is null". The other change is to take the "*" out of the combo box - instruct the user to either leave it blank, or set it to null via code if they select this option, because the query will be testing for a null value.

tyrone
02-13-2007, 09:39 PM
Thank you for your help - works perfectly. The solution always seems so elementary when someone else provides it. Happy customer :>)

tyrone