Hello, help is appreciated;
Dim qname As String
qname = Me.CboName.Value
Dim RcC As Recordset
Dim RCsql As String
RCsql = "SELECT IncomeTrans.iID, IncomeTrans.iDate, IncomeTrans.iname, IncomeTrans.MeNet, IncomeTrans.Oshor, IncomeTransDeu.MeDeduct, IncomeTransDeu.OshDeduct," _
& " IncomeTrans.RTOshor, IncomeTrans.RTMeNet FROM IncomeTrans LEFT JOIN IncomeTransDeu ON IncomeTrans.[iID] = IncomeTransDeu.[iiU] WHERE (((IncomeTrans.iname) = qname))" _
& " ORDER BY IncomeTrans.iDate desc, IncomeTrans.iid desc;"
Set RcC = CurrentDb.OpenRecordset(RCsql, dbOpenDynaset)
It gets to this point then error msg "Run-time error 3061 , too few parameter, expected 1"
What am I doing wrong?
I replaced the me.cboname in sql with a "name", it worked fine. but using cboname or forms!formname!cboname gives that error.
Please help.
Thanks.
Dim qname As String
qname = Me.CboName.Value
Dim RcC As Recordset
Dim RCsql As String
RCsql = "SELECT IncomeTrans.iID, IncomeTrans.iDate, IncomeTrans.iname, IncomeTrans.MeNet, IncomeTrans.Oshor, IncomeTransDeu.MeDeduct, IncomeTransDeu.OshDeduct," _
& " IncomeTrans.RTOshor, IncomeTrans.RTMeNet FROM IncomeTrans LEFT JOIN IncomeTransDeu ON IncomeTrans.[iID] = IncomeTransDeu.[iiU] WHERE (((IncomeTrans.iname) = qname))" _
& " ORDER BY IncomeTrans.iDate desc, IncomeTrans.iid desc;"
Set RcC = CurrentDb.OpenRecordset(RCsql, dbOpenDynaset)
It gets to this point then error msg "Run-time error 3061 , too few parameter, expected 1"
What am I doing wrong?
I replaced the me.cboname in sql with a "name", it worked fine. but using cboname or forms!formname!cboname gives that error.
Please help.
Thanks.