Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rst!Find First doesnot work if I use a "date" search criterion

Status
Not open for further replies.

Jawad77

Programmer
Dec 23, 2004
41
US
I am trying to go to a particular record in my recordset and I using this line of code

rst.FindFirst "[Weekending] =" & 1/14/2005

and it doesn't take me to the current WeekEndingDate record in my recordset. I tried using:

rst.FindFirst "[Weekending] =" & #1/14/2005# but it doesn't work either.

FindFirst method works though When I change my search criterion to:

rst.FindFirst "[FiscalWeek] =" & 50

Looks like I am not using the right syntax when I use week ending date in my crietrion. Otherwise it works when I use a number in the search criterion.

Any ideas/thoughts? Thanks a lot in advance for your help

Jay

 
Try this:

rst.FindFirst "[Weekending] =#" & Cdate("1/14/2005") & "#"

or this:

rst.FindFirst "[Weekending] = #1/14/2005#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top