RE: select all

Tech-Archive recommends: Fix windows errors by optimizing your registry



nope, still getting the same message

"Ryan" wrote:

Try this.

IIf(IsNull([Forms]![SNM Type Form Query approach]![Combo22],[SNM
Type],[Forms]![SNM Type Form Query approach]![Combo 22]))

All I added was the [ ] around SNMType.

We will get this to work, I have about 75 of these iif statements running
around in my apps.

--
Please remember to mark this post as answered if this solves your problem.


"NukeEng85" wrote:

hmm, I put this in:
IIf(IsNull([Forms]![SNM Type Form Query approach]![Combo22],SNM
Type,[Forms]![SNM Type Form Query approach]![Combo 22]))

and got "the expression you entered has a function containing the wrong
number of arguments." again...

Sorry! Thanks for continuing to try, and don't worry about the other one's
not working, I'm just grateful for the help


"Ryan" wrote:

Wow, I must be tired today. Take of the last ! too. This is the correct code.
IIf(IsNull([Forms]![NameOfForm]![NameOfCombo],NameOfFieldCriteriaIsOn,[Forms]![NameOfForm]![NameOfCombo]))

--
Please remember to mark this post as answered if this solves your problem.


"NukeEng85" wrote:

I got an error message when I entered the new criteria saying "the expression
you entered has a function containing the wrong number of arguments."
"Ryan" wrote:

I wouldnt use an all in the query, I would use a null value, meaning nothing
at at all in the drop down. Then just ajust your criteria to look like this.

IIf(IsNull([Forms]![NameOfForm]![NameOfCombo],NameOfFieldCriteriaIsOn,[Forms]![NameOfForm]![NameOfCombo]![NameOfCombo]))

This says if the combo is null, use all values with no criteria, else use
the value in the combo as the criteria for the query.
--
Please remember to mark this post as answered if this solves your problem.


"NukeEng85" wrote:

Using two combo boxes, need a select "all" option, so that filter turns off
for that combo box and records matching all the criteria in the first box and
only the criteria selected in the second box are retrieved.

I have this in my rowsource: SELECT DISTINCT [SNM Data].[SNM Type] FROM [SNM
Data] UNION Select "(All)" as Bogus From [SNM Data]
ORDER BY [SNM Data].[SNM Type];

and in my criteria for the query I have this
Forms!NameOfForm!NameOfCombo Or (Forms!NameOfForm!NameOfCombo Is Null)

an "all" shows up in my combo box, but when I use it as a selection, no
records come up. I want it so that ALL the records come up. Any help would
be much appreciated.


.



Relevant Pages

  • RE: select all
    ... Please remember to mark this post as answered if this solves your problem. ... "NukeEng85" wrote: ... "Ryan" wrote: ... Then just ajust your criteria to look like this. ...
    (microsoft.public.access.formscoding)
  • RE: select all
    ... one of my query criteria that is in a live app and working. ... Please remember to mark this post as answered if this solves your problem. ... "NukeEng85" wrote: ... Then just ajust your criteria to look like this. ...
    (microsoft.public.access.formscoding)
  • RE: select all
    ... Please remember to mark this post as answered if this solves your problem. ... "NukeEng85" wrote: ... Then just ajust your criteria to look like this. ... the value in the combo as the criteria for the query. ...
    (microsoft.public.access.formscoding)
  • RE: select all
    ... "Ryan" wrote: ... Please remember to mark this post as answered if this solves your problem. ... "NukeEng85" wrote: ... Then just ajust your criteria to look like this. ...
    (microsoft.public.access.formscoding)
  • Re: Query based off a form
    ... FROM tblmain ... "Ryan" wrote: ... only return results if all six criteria are filled. ... care about the age or name. ...
    (microsoft.public.access.queries)