This should be easy

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am building a form for a person to select conditions for a query. In the
table there is a column built on a Yes/No being 0 or -1. I would like to
have a check box or a combo box on the form to choose Painted, Not painted or
all. I don't know why, but I can't get it to work. I used a combo with a
bound column containing 0,-1, and " ". I also tried an IIf in the condition,
that returned an error telling me my condition was too complicated to
evaluate.
Any Help is greatly appreciated.
 
Perhaps using the "Option Group" from the toolbox may help, instead of a
combo box. The wizard enables you to assign values.
 
the problem with an option group is that it needs values as results. I would
need to return a wld card or something to return all the records. This would
work to return painted or unpainted.
 
I went back to the combo box and it works except the "all". I am trying to
pass "Like "*"" to the criteria, but I get that the formula is to complex to
be evaluated.
If I wasn't bald I would be pulling my hair out.
again any help is greatly appreciated.
 
Ken said:
I am building a form for a person to select conditions for a query. In the
table there is a column built on a Yes/No being 0 or -1. I would like to
have a check box or a combo box on the form to choose Painted, Not painted or
all. I don't know why, but I can't get it to work. I used a combo with a
bound column containing 0,-1, and " ". I also tried an IIf in the condition,
that returned an error telling me my condition was too complicated to
evaluate.
Any Help is greatly appreciated.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes/No (True/False) controls (CheckBoxes) can be -1, 0 or NULL. They
cannot be a space character (" "). If you want to check for NULL use
IsNull(ControlName). If you have more than 2 options you should use a
ComboBox instead of a CheckBox.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQmQM8YechKqOuFEgEQL9fgCffD8ggFmhy5Xjxaaz5UJgZcThcd4AoLNY
gdY9i+o4HrVPpd6Y6z5bEYtk
=OuE0
-----END PGP SIGNATURE-----
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To use "ALL" you'd have to change the query's criteria like this:

WHERE Forms!CriteriaForm!ComboBoxName = "ALL"
OR (Forms!CriteriaForm!ComboBoxName <> "ALL"
AND criteria_column = Forms!CriteriaForm!ComboBoxName)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA+AwUBQmQP5IechKqOuFEgEQIy/wCgkeB+ZJrNuTKazZyIVurD8JY8g7cAl38a
wCEbNqxwme6O1lcit4hoU5g=
=/EMo
-----END PGP SIGNATURE-----
 
Back
Top