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:

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
at runtime I get a runtime error 3075 - syntax error.

HELP!!