|
 |
access_asp thread: Refining a search
Message #1 by "Cathryn Bennett" <cbennett@f...> on Thu, 12 Dec 2002 14:12:13 -0500
|
|
Quick question...
I have the following
strsql = "Select * From timelog " &_
"where last LIKE '%" & Replace(strSearch, "'", "''") & "%' OR first LIKE
'%" & Replace(strSearch, "'", "''") & "%'"
This works like a charm BUT...
I need to refine the search to today's records only. What do I add and where
do I add it to refine the search? None of the variations I've tried seem to
work, I get syntax errors.
Thanks,
Cathryn
Message #2 by panipuri99@h... on Thu, 12 Dec 2002 21:06:38
|
|
HAve you tried the clause
"AND yourDate=Date()"
> Quick question...
I have the following
strsql = "Select * From timelog " &_
"where last LIKE '%" & Replace(strSearch, "'", "''") & "%' OR first
LIKE
'%" & Replace(strSearch, "'", "''") & "%'"
This works like a charm BUT...
I need to refine the search to today's records only. What do I add and
where
do I add it to refine the search? None of the variations I've tried seem
to
work, I get syntax errors.
Thanks,
Cathryn
Message #3 by "Cathryn Bennett" <cbennett@f...> on Thu, 12 Dec 2002 17:12:43 -0500
|
|
Thanks for the response.
This still returns "all" of the records, not just those from today (today
being whatever day it is when I run the query <grin>).
Cathy
----- Original Message -----
From: <panipuri99@h...>
To: "Access ASP" <access_asp@p...>
Sent: Thursday, December 12, 2002 9:06 PM
Subject: [access_asp] Re: Refining a search
> HAve you tried the clause
>
> "AND yourDate=Date()"
>
>
>
> > Quick question...
>
> I have the following
>
> strsql = "Select * From timelog " &_
> "where last LIKE '%" & Replace(strSearch, "'", "''") & "%' OR first
> LIKE
> '%" & Replace(strSearch, "'", "''") & "%'"
>
> This works like a charm BUT...
>
> I need to refine the search to today's records only. What do I add and
> where
> do I add it to refine the search? None of the variations I've tried seem
> to
> work, I get syntax errors.
>
> Thanks,
>
> Cathryn
>
>
Message #4 by panipuri99@h... on Fri, 13 Dec 2002 15:30:31
|
|
try parenthesis around your clause and join it with "AND yourDate=Date()"
> HAve you tried the clause
> "AND yourDate=Date()"
>
> > Quick question...
> I have the following
> strsql = "Select * From timelog " &_
> "where last LIKE '%" & Replace(strSearch, "'", "''") & "%' OR first
L> IKE
'> %" & Replace(strSearch, "'", "''") & "%'"
> This works like a charm BUT...
> I need to refine the search to today's records only. What do I add and
w> here
d> o I add it to refine the search? None of the variations I've tried
seem
t> o
w> ork, I get syntax errors.
> Thanks,
> Cathryn
|
|
 |