piet wrote:
Is it possible to add an option ALL in the ist of a combobox that get its
values from a table?
Example:
in the combobox are the items from the table "days": monday, th....
The chosen value from the combobox is used in a query to select only the
records of the chosen day.
Now I want to have the possibility to have also ALL in my combobox-list to
select the records for all the days.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Perhaps a criteria like this (assumes the ComboBox has 2 columns: the
first column [bound column] is the days' week numbers; the second column
is the name of the week day - ALL has a NULL week day number):
PARAMETERS Forms!FormName!cboWeekDays Date;
SELECT ... etc.
WHERE Forms!FormName!cboWeekDays IS NULL OR
(Forms!FormName!cboWeekDays IS NOT NULL
AND WeekDay(DateColumn) = Forms!FormName!cboWeekDays)
[Change the names to suit your set up]
If ALL is selected, in the ComboBox Forms!FormName!cboWeekDays, IS NULL
evaluates to TRUE and all records are retrieved. If ALL is not selected
the OR (...) part of the criteria evaluates to true & selects only
records that have the date column w/ the required weekday value.
I got the above criteria idea from a db of samples queries from MS:
http://support.microsoft.com/default...b;en-us;182568
- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQG6PBoechKqOuFEgEQJG9gCfUsyTIa1AABnsjvUbZU3isS wDq+EAnRI2
1pM+Db1j/miKtZEMaWsPt3vw
=222i
-----END PGP SIGNATURE-----