When I put this code in I get the error: Invalid SQL Statement, Expected 'DELETE', 'INSERT', 'PROCEEDURE', 'SELECT' or 'UPDATE'
Expand|Select|Wrap|Line Numbers
- strSqlYear = "SELECT tblJobDetails.TFN, tblJobDetails.ReturnType, tblYearsPerReceipt.Year FROM tblJobDetails, tblYearsPerReceipt WHERE (tblJobDetails.TFN)= " & Me.tbTFN & " AND (tblJobDetails.ReturnType)= " & Me.cboReturnType & " AND (tblYearsPerReceipt.Year)= " & Me.cboYear
1. I have done Dim strStrYear as String
2. Me.tbTFN is a textbox in the form to which this code relates
3. Me.cboReturnType is a ComboBox in the form to which this code relates
4. Me.cboYear is a ComboBox in the form to which this code relates
any help would be much appreciated.
Best Regards