Hello all,
On running this code below I get the errmsg: Too few parameters. Expected :
1
[Emailadres] is an existing field in a linked table.
Can anybody see what I do wrong here?
Many thanks
Ronny
Dim dbsMyCheckBase As Database
Dim rst2 As DAO.Recordset
Set dbsMyCheckBase = OpenDatabase("MyPath\MyFile.mdb")
Dim sCheckVar As String
sCheckVar = Nz(Trim(ObjXL.Cells(nRow, nEmailadres).Value))
strSQL = "select * from tblDhscmails where [Emailadres] = sCheckVar"
Set rst2 = dbsMyCheckBase.OpenRecordset(strSQL) '<------------ ERROR LINE
nHowMuchRecs = rst2.RecordCount