Data type mismatch using date() function
I know where the problem is but i just cannot get past it, please help me and tell me why I get the error message:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression. (line 71)
rs.source = "SELECT * FROM Messages WHERE VendNum = '" & VendNumb & "';"
do while not rs.eof
if rs.recordcount > 0 then
idnumber = rs("IDNum")
vendmsg = rs("Message")
messagedate = rs("DateCreated")
todaysdate = date()
sql = "UPDATE Messages SET DateDisplayed = '" & todaysdate & "' WHERE VendNum = '" & VendNumb & "' AND IDNum = '" & idnumber & "';"
vendmsg = "You have no new messages."
messagedate = date
response.Write("<font color=#cc0000 size=4 face=Georgia>" & messagedate & "<BR>" & vendmsg & "<BR><br>")
Fixed and now another problem
It was the IDNum with the literal quotes around it. Now I am getting an error with the "rs.movenext()" function. It says that this action cannot be performed when the database is open.....so what is my problem now....where am I missing something or have something out of place?