Double filter

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

greenbite via AccessMonster.com

hi there

ive got a filter that works based on a search criteria (thank you allen
browne) it works great however im alittle stuck when it comes to a combo box
whereby i want to say that if the user chooses "Good Leavers" then can the
system filter - the processed_leaveing date is null And the status field says
'Exercised' does anyone know how to do this? i've provided the code below

also, staying on the topic, does anyone know wht the coding would be to
return the opposite? ie - i have another combo box that says 'no performance
target'(1) and 'performance target'(2). when (1) is chosen, it returns all
the records with no perf.target, no problem however when (2) is chosen, i'd
like all the other performance targets to be displayed other than 'no
performance target'. it comes from a list called PT_NAME [states the name of
the pt...it's never null] can anyone help?

If Me.cmbo_exercised = "Exercised" Then
strWhere = strWhere & "([Status] = 'exercised') And "
ElseIf Me.cmbo_exercised = "Current" Then
strWhere = strWhere & "([Status] = 'current') And "
ElseIf Me.cmbo_exercised = "Lapsed" Then
strWhere = strWhere & " ([Status] = 'Lapsed') And "
ElseIf Me.cmbo_exercised = "Good Leavers" Then
strWhere = strWhere & " (([PROCESSED_LEAVE_DATE] = not null) and ([status]
= 'exercised')) and "
End If
 
J

Jeff L

When checking for Null or not Null, the syntax you use is IS NULL or IS
NOT NULL, no equal sign: [PROCESSED_LEAVE_DATE] Is Not Null.

Your other question, when you want to return every value with the
exception of one, you use <>: YourFieldName <> "No Performance Target"

Hope that helps!
 
G

greenbite via AccessMonster.com

THANKS JEFF - that worked great!



Jeff said:
When checking for Null or not Null, the syntax you use is IS NULL or IS
NOT NULL, no equal sign: [PROCESSED_LEAVE_DATE] Is Not Null.

Your other question, when you want to return every value with the
exception of one, you use <>: YourFieldName <> "No Performance Target"

Hope that helps!
[quoted text clipped - 26 lines]
Message posted via AccessMonster.com
 

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