By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

A97 QBF question...

P: n/a
MLH
When entering a criteria into the QBE grid like this one...

[Forms]![frmDMV1stLttr_Type_Other]![ColorFilter]

I intend for the query to return rows where the value
in the field being examined is a string like "blue". But
if the [ColorFilter] control on the form is a combo-box
who's value hasn't been chosen yet, then

[Forms]![frmDMV1stLttr_Type_Other]![ColorFilter]

evaluates to something other than the string name
of a color. I don't know what it evaluates to, but I
do know that it prevents the query from displaying
any records.

What I'm trying to do is to return ALL vehicle records
unless the color filter combobox on the form has a
value of say "red", in which case I want the query
to return only records for red vehicles.
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
MLH wrote:
When entering a criteria into the QBE grid like this one...

[Forms]![frmDMV1stLttr_Type_Other]![ColorFilter]

I intend for the query to return rows where the value
in the field being examined is a string like "blue". But
if the [ColorFilter] control on the form is a combo-box
who's value hasn't been chosen yet, then

[Forms]![frmDMV1stLttr_Type_Other]![ColorFilter]

evaluates to something other than the string name
of a color. I don't know what it evaluates to, but I
do know that it prevents the query from displaying
any records.

What I'm trying to do is to return ALL vehicle records
unless the color filter combobox on the form has a
value of say "red", in which case I want the query
to return only records for red vehicles.


Try:

Like Nz([Forms]![frmDMV1stLttr_Type_Other]![ColorFilter],"*")

--
[OO=00=OO]
Nov 13 '05 #2

P: n/a
MLH
<censored>
Trevor, you're a genius. Worked like a charm. Many thx.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Try:

Like Nz([Forms]![frmDMV1stLttr_Type_Other]![ColorFilter],"*")


Nov 13 '05 #3

P: n/a
MLH
Nz really is useful here. Is it new with A97?
I don't remember ever seeing it or hearing
about it in Access 2.0.
Nov 13 '05 #4

P: n/a
MLH wrote:
Nz really is useful here. Is it new with A97?
I don't remember ever seeing it or hearing
about it in Access 2.0.


You're really rattling my memory now, asking about what was introduced
into something 8 years ago :-)

Yes, I think it was introduced in 97 although it could have been in 95
but I (and quite a few others) reverted back to v2.0 when 95 came out.

I do remember writing my own Nul2Zero() function in Access 2.0

How come you've only just upgraded to a version that had it's official
MS support withdrawn about 4 or 5 years ago?

--
[OO=00=OO]
Nov 13 '05 #5

P: n/a
MLH
<chop>
That's it then. If you wrote your own, without a doubt, it wasn't
there. I didn't remember seeing it. Nice little add'n they did there.

xxxxxxxxxxxxxxxxxxxxx

I do remember writing my own Nul2Zero() function in Access 2.0

How come you've only just upgraded to a version that had it's official
MS support withdrawn about 4 or 5 years ago?


Nov 13 '05 #6

P: n/a
MLH wrote:
<chop>
That's it then. If you wrote your own, without a doubt, it wasn't
there. I didn't remember seeing it. Nice little add'n they did there.


Not necessarily <g>

I also wrote my own routine to add a number of days, weeks or months to
a date, taking into account leap years and Y2K, etc (pretty good for
back in 94/95) as I had done this before in COBOL.

Only later I found out Access had a DateAdd() function :-\

--
[OO=00=OO]
Nov 13 '05 #7

P: n/a
MLH
That is a bummer!

I also wrote my own routine to add a number of days, weeks or months to
a date, taking into account leap years and Y2K, etc (pretty good for
back in 94/95) as I had done this before in COBOL.

Only later I found out Access had a DateAdd() function :-\


Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.