I am (forced to) use a dBase IV database an am having real difficulty getting a certain SQL string to work. The code fot the bit I am using is:
at runtime I get a runtime error 3075 - syntax error.Code:Private Sub cmdExcep_Click() Dim sLike$ Set rsMain = Nothing sLike = "*TEST*" With dlgOutput.List1 .AddItem "TEST1" sSQL = "SELECT * FROM " & sFileN & " WHERE " & sFileN & "![ERROR] LIKE '" & sLike & "'" ' sFileN is the .dbf filename eg alpha.dbf Set rsMain = dbMain.OpenRecordset(sSQL) End With End Sub
HELP!!


Reply With Quote
