nick941741
Registered User.
- Local time
- Today, 17:52
- Joined
- Mar 17, 2009
- Messages
- 21
Hi, I have a search from that searches a table called 'events' (which contains booking details for customers events)
On the search page I did originaly have just a date field and in my search query I had the following
EventDate] Like "*" & [Forms]![frmEventSearch]![txtEventDate] & "*" Or [Forms]![frmEventSearch]![txtEventDate] Is Null
So even if that field was NULL then the search would still look at the other fields and run.
Now though I need to do a search based on a date range, so have create 2 boxes on my search page txtEventStart and txtEventEnd, but I am having lots of problems getting the search query to work I have tried several different versions now but it only ever seems to work on the first box and not both.
Any help would be apprecaiated.
This is as far as I got [EventDate] Between ([Forms]![frmEventSearch]![txtEventStart] & "*" Or [Forms]![frmEventSearch]![txtEventStart] Is Null) And ([Forms]![frmEventSearch]![txtEventEnd] & "*" Or [Forms]![frmEventSearch]![txtEventEnd] Is Null)
On the search page I did originaly have just a date field and in my search query I had the following
EventDate] Like "*" & [Forms]![frmEventSearch]![txtEventDate] & "*" Or [Forms]![frmEventSearch]![txtEventDate] Is Null
So even if that field was NULL then the search would still look at the other fields and run.
Now though I need to do a search based on a date range, so have create 2 boxes on my search page txtEventStart and txtEventEnd, but I am having lots of problems getting the search query to work I have tried several different versions now but it only ever seems to work on the first box and not both.
Any help would be apprecaiated.
This is as far as I got [EventDate] Between ([Forms]![frmEventSearch]![txtEventStart] & "*" Or [Forms]![frmEventSearch]![txtEventStart] Is Null) And ([Forms]![frmEventSearch]![txtEventEnd] & "*" Or [Forms]![frmEventSearch]![txtEventEnd] Is Null)