B
BobK
I have the following code in a vba code attached to a form:
Dim rst As Recordset
Dim dbs As Database
Dim whatif As String
Set dbs = CurrentDb
whatif = "select * from PersonalDNC where HomePhone = '" & ThisPhone & "'"
Set rst = dbs.OpenRecordset(whatif)
When I run this 2003 mdb in access 2007 this works. When I convert this to
a 2007 database and then run it, I get a "Type Mismatch" error. would I need
to put [ ] around HomePhone. PersonalDNC is a linked table that points to a
2003 mdb. Would I need to convert the linked mdb to a 2007 also. I do not
have 2007 but my client does. I am only able to test this on their site.
Thank you
Bob
Dim rst As Recordset
Dim dbs As Database
Dim whatif As String
Set dbs = CurrentDb
whatif = "select * from PersonalDNC where HomePhone = '" & ThisPhone & "'"
Set rst = dbs.OpenRecordset(whatif)
When I run this 2003 mdb in access 2007 this works. When I convert this to
a 2007 database and then run it, I get a "Type Mismatch" error. would I need
to put [ ] around HomePhone. PersonalDNC is a linked table that points to a
2003 mdb. Would I need to convert the linked mdb to a 2007 also. I do not
have 2007 but my client does. I am only able to test this on their site.
Thank you
Bob