View Full Version : Multiple selections from dialogs as params for queries


Eileen
06-12-2000, 01:46 AM
Is there a way of getting more than 8 buttons on a switchboard form?

Also, I use dialog boxes with drop down lists on an unbound field to specify criteria in reports. I have [Forms]![Dialog]![Text1]etc in the criteria of an underlying query. Does anyone know what I would need to do to allow the field to be blank for all, and also how I would go about allowing multiple selections ie several options from a list.

Examples of any code or expressions needed for either of these would be great.

Thanks
Eileen

Pat Hartman
06-12-2000, 08:23 AM
The only way to get more than 8 items on a single switchboard is to modify the form and the code it contains (not recommended). The switchboard manager can build a hierarchy of switchboards so the simple answer is to organize your switchboard items into a hierarchy.

To allow the field to be blank for all, you can change the query's WHERE clause to:
WHERE TableField Like [Forms]![Dialog]![Text1] & "*";

To use multiple selections from a list, you need to build the SQL in code so you can use the IN operator:
WHERE TableField IN (...,...,...,etc.);
There is a sample of this technique available on the Microsoft support site -
Q100131 - ACC How to Create a Parameter In() Statement

Pat Hartman
06-12-2000, 08:23 AM
The only way to get more than 8 items on a single switchboard is to modify the form and the code it contains (not recommended). The switchboard manager can build a hierarchy of switchboards so the simple answer is to organize your switchboard items into a hierarchy.

To allow the field to be blank for all, you can change the query's WHERE clause to:
WHERE TableField Like [Forms]![Dialog]![Text1] & "*";

To use multiple selections from a list, you need to build the SQL in code so you can use the IN operator:
WHERE TableField IN (...,...,...,etc.);
There is a sample of this technique available on the Microsoft support site -
Q100131 - ACC How to Create a Parameter In() Statement

Pat Hartman
06-12-2000, 08:23 AM
The only way to get more than 8 items on a single switchboard is to modify the form and the code it contains (not recommended). The switchboard manager can build a hierarchy of switchboards so the simple answer is to organize your switchboard items into a hierarchy.

To allow the field to be blank for all, you can change the query's WHERE clause to:
WHERE TableField Like [Forms]![Dialog]![Text1] & "*";

To use multiple selections from a list, you need to build the SQL in code so you can use the IN operator:
WHERE TableField IN (...,...,...,etc.);
There is a sample of this technique available on the Microsoft support site -
Q100131 - ACC How to Create a Parameter In() Statement

Pat Hartman
06-12-2000, 08:26 AM
Sorry, I kept getting an error when I tried to post the answer. I guess I succeded.