G
Guest
I have the code below:
------
Dim Mydate as date
Dim MyTableName as String
Dim dbs As Database
Set dbs = CurrentDb
Dim rs1 As DAO.Recordset
...
' caculated and assigned a date to MYdate
' Also assigned a table name to MyTableName
...
Set rs1 = dbs.OpenRecordset _
("SELECT * FROM " & TableName & " WHERE (" & TableName & "!InputDate
When executing the code, I got a Type mis-match error for Mydate. When I
change the code to:
("SELECT * FROM " & TableName & " WHERE (" & TableName & "!InputDate
statement?
Thanks Much!
------
Dim Mydate as date
Dim MyTableName as String
Dim dbs As Database
Set dbs = CurrentDb
Dim rs1 As DAO.Recordset
...
' caculated and assigned a date to MYdate
' Also assigned a table name to MyTableName
...
Set rs1 = dbs.OpenRecordset _
("SELECT * FROM " & TableName & " WHERE (" & TableName & "!InputDate
= 'Mydate')")
When executing the code, I got a Type mis-match error for Mydate. When I
change the code to:
("SELECT * FROM " & TableName & " WHERE (" & TableName & "!InputDate
Everything would be fine. Is anyone know the right format for the first sql= #11/1/05# )")
statement?
Thanks Much!