Search by derived field.

P

Plink

hi, im hoping someone can help.

i have a database with a derived field. It shows whether my record is
active/expired based on a date calculation.
Here is the statement attached to the unbound text box.
=IIf([ActiveFrom]+365>Date(),"Active","Expired")

Im having trouble using this data. I need to be able to search by
active/expired records, along with 4/5 other search fields. Here is an
example of my other search strings.
If Not IsNull(Me.Surnamebox) Then
strWhere = strWhere & "([Surname] Like ""*" & Me.Surnamebox & "*"")
AND "

Everything goes sweetly, the text box works, my other searches run, but any
time I try to combine the two, it just isn't goin for me. Can someone advise?

Thnkyu.
 
P

Plink via AccessMonster.com

Here is a section of the code for my search, Id appreciate it if someone
could suggest something

If Not IsNull(Me.cboMemberType) Then
strWhere = strWhere & "([Member Type] Like ""*" & Me.cboMemberType &
"*"") AND "
End If

If Not IsNull(Me.cboMemberStatus) Then
strWhere = strWhere & "(=IIf([ActiveFrom]+365>Date(),"Active",
"Expired"") AND "
End If
 

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