J
Joe bohen
I call the following function from frmdate, the date
txtDateShort is placed on the form when the user selects a
date from a calendar. When the function gets to the find
criteria it calls the error "arguments are of the wrong
type, are out of acceptable range, or are in conflict with
one another" vardate returns the value #30/04/2003# and
the query field date is formatted as a short date.
Where am I going wrong, I have used other fields in the
query as the find criteria and the function works fine?
Any help would be appreciated.
Dim cnThisConnect As ADODB.Connection
Dim rcdsubbies As New ADODB.Recordset
Dim vardate As Variant
vardate = Format([Forms]![frmdate]!
[txtDateShort], "\#dd\/mm\/yyyy\#")
Set cnThisConnect = CurrentProject.Connection
rcdsubbies.Open "qrydelete", cnThisConnect,
adOpenKeyset, adLockOptimistic, adCmdTable
rcdsubbies.MoveFirst
rcdsubbies.Find "[date] < #" & vardate & "#"
txtDateShort is placed on the form when the user selects a
date from a calendar. When the function gets to the find
criteria it calls the error "arguments are of the wrong
type, are out of acceptable range, or are in conflict with
one another" vardate returns the value #30/04/2003# and
the query field date is formatted as a short date.
Where am I going wrong, I have used other fields in the
query as the find criteria and the function works fine?
Any help would be appreciated.
Dim cnThisConnect As ADODB.Connection
Dim rcdsubbies As New ADODB.Recordset
Dim vardate As Variant
vardate = Format([Forms]![frmdate]!
[txtDateShort], "\#dd\/mm\/yyyy\#")
Set cnThisConnect = CurrentProject.Connection
rcdsubbies.Open "qrydelete", cnThisConnect,
adOpenKeyset, adLockOptimistic, adCmdTable
rcdsubbies.MoveFirst
rcdsubbies.Find "[date] < #" & vardate & "#"