|
-
Sep 4th, 2007, 07:41 PM
#1
Thread Starter
Frenzied Member
-
Sep 4th, 2007, 10:20 PM
#2
Addicted Member
Re: Search within date range only
You can use this
strSQL = "SELECT * FROM TABLENAME WHERE (DATEFIELD BETWEEN '" & dtpFrom.Value & "' AND '" & dtpTo.Value & "'") AND (ANYFIELD LIKE 'ANYKEYWORD%') ORDER BY ID
Do Good. Be Good. The World is yours.
-
Sep 5th, 2007, 09:12 AM
#3
Thread Starter
Frenzied Member
Re: Search within date range only
Ahh. Is that it? You mean im only missing a parenthesis? I'll try that out.
-
Sep 5th, 2007, 09:26 AM
#4
Thread Starter
Frenzied Member
Re: Search within date range only
Thanks! Post rated. I made myself a fool.
-
Sep 5th, 2007, 10:23 AM
#5
Re: [RESOLVED] Search within date range only
The parenthesis aren't strictly needed, but are a good idea (they make it clearer, and reduce mistakes when you have a mixture of And/Or).
The important thing is that you had WHERE twice, and it should only be used once.
-
Sep 5th, 2007, 10:25 AM
#6
Thread Starter
Frenzied Member
Re: [RESOLVED] Search within date range only
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|