help please

  • Thread starter greenbite via AccessMonster.com
  • Start date
G

greenbite via AccessMonster.com

would anyone know why this doesnt work?

strWhere = strWhere & "([processed_leave_date] = not null AND [date_exercised]
= null) and "

it's a line from a filter i've created...the rest work but i cant get this
one to! i'm trying to create 2 criteria's for the filter but it's just
returning a blank form!
 
G

greenbite via AccessMonster.com

sorry! i got it to work!
would anyone know why this doesnt work?

strWhere = strWhere & "([processed_leave_date] = not null AND [date_exercised]
= null) and "

it's a line from a filter i've created...the rest work but i cant get this
one to! i'm trying to create 2 criteria's for the filter but it's just
returning a blank form!
 
T

Tom Lake

greenbite via AccessMonster.com said:
sorry! i got it to work!

What did you do to fix it? I would have recommended:

strWhere = strWhere & "(Not IsNull([processed_leave_date]) And
IsNull([date_exercised])) and "

Tom Lake
 
D

Douglas J. Steele

Tom Lake said:
greenbite via AccessMonster.com said:
sorry! i got it to work!

What did you do to fix it? I would have recommended:

strWhere = strWhere & "(Not IsNull([processed_leave_date]) And
IsNull([date_exercised])) and "

Whereas I would have recommended

strWhere = strWhere & " [processed_leave_date] IS NOT NULL And
[date_exercised] IS NULL and "

There's no reason to use VBA functions there when native SQL syntax is
sufficient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top