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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi I am using following lines to 1

Status
Not open for further replies.

gerry03

Technical User
May 7, 2003
13
IN
Hi

I am using following lines to obtain information from a table but when I run, it diasplays following error

data type mismatch in criteria expression

bill_date is date/time type field in bill_table. Help me to sort out the problem please.

In fact I want to retrieve data for a specified date or BETWEEN dates.


Set rsSrch = New ADODB.Recordset

SqlStr = "SELECT * FROM Bill_Table WHERE bill_date >= '" &
Format(Text4.Text, "dd-mm-yyyy") & "'"

rsSrch.Open SqlStr, ConnEdit, adOpenStatic, adLockOptimistic
 
1. If you are using a JET/ACCESS Mdb, then enclose the date in # signs instead of single quotes.

2. Format the date as mm-dd-yyyy
 
Thanks CCLINT

I will try, and I hope this should be applicable.

One more thing in my last posts I asked how to edit an existing record but I couldn't get satisfied answer please be kind enough to solve that problem also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top