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
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