I am using a query in my code
ssql5 = "select * from [my table] " _
& "where [my field1] = " & rstmyrecordset![my field1] _
& " and [my field2] = " & rstemyrecordset![my field2]
I then open the recordset like this
Set rsttemp = dbscurrent.OpenRecordset(ssql5, dbOpenDynaset)
My problem is that my data has brackets like this
rstmyrecordset![my field1] = blue(s)
I get a runtime error 3075 that says: invalid use of '.','!' or '()' in query expression. However, this is a user database and I cannot change the way their data looks. Is there any way I can make access read the brackets in the data without giving me an error?
ssql5 = "select * from [my table] " _
& "where [my field1] = " & rstmyrecordset![my field1] _
& " and [my field2] = " & rstemyrecordset![my field2]
I then open the recordset like this
Set rsttemp = dbscurrent.OpenRecordset(ssql5, dbOpenDynaset)
My problem is that my data has brackets like this
rstmyrecordset![my field1] = blue(s)
I get a runtime error 3075 that says: invalid use of '.','!' or '()' in query expression. However, this is a user database and I cannot change the way their data looks. Is there any way I can make access read the brackets in the data without giving me an error?