I have some code that runs ok in Access 2010, but coughs in Access 2007
It halts on the i, giving a notice:
For each control variable on arrays must be varient
I had to import the Access 2010 into a 2007 database because the control events did not work?, looked at all references.
seemed same. Maybe a backward compatability problem? Any ideas appreciated
Code:
Dim TmpKeywords() As String
Dim tblKeywords As String
Dim i As Integer
Dim sql As String
tblKeywords = "one,two,three"
TmpKeywords = Split(tblKeywords, ",")
For Each i In TmpKeywords
sql = sql & " OR Documents Like '%" & i & "%'"
Next i
It halts on the i, giving a notice:
For each control variable on arrays must be varient
I had to import the Access 2010 into a 2007 database because the control events did not work?, looked at all references.
seemed same. Maybe a backward compatability problem? Any ideas appreciated