I have 3 comboboxes - Month Year and Employee
I need to match the user chosen month, year and employee to the database and print the employees VAT amount in a text box
Below is some of the code and the query I am having problems with (the query gives error: too few parameters - expected 4
can anyone help?
Private Sub MonthCombo_Click()
strMonth = MonthCombo.Text
End Sub
'the same "combo clicks are also done for Year and Employee
Private Sub EnterDate_Click()
Dim VATQuerySet As DAO.Recordset
Set VATQuerySet = CurrentDb.OpenRecordset("SELECT BillingMonths.[Total Excluding VAT] FROM SimsUpdate INNER JOIN BillingMonths ON SimsUpdate.GSM=BillingMonths.GSM WHERE BillingMonths.[Month] = strMonth AND BillingMonths.[Year] = strYear and SimsUpdate.[EmployeeName] = strEmployee")
End Sub
'i have the query all on one line so next line with '_' is
'not the problem
I need to match the user chosen month, year and employee to the database and print the employees VAT amount in a text box
Below is some of the code and the query I am having problems with (the query gives error: too few parameters - expected 4
can anyone help?
Private Sub MonthCombo_Click()
strMonth = MonthCombo.Text
End Sub
'the same "combo clicks are also done for Year and Employee
Private Sub EnterDate_Click()
Dim VATQuerySet As DAO.Recordset
Set VATQuerySet = CurrentDb.OpenRecordset("SELECT BillingMonths.[Total Excluding VAT] FROM SimsUpdate INNER JOIN BillingMonths ON SimsUpdate.GSM=BillingMonths.GSM WHERE BillingMonths.[Month] = strMonth AND BillingMonths.[Year] = strYear and SimsUpdate.[EmployeeName] = strEmployee")
End Sub
'i have the query all on one line so next line with '_' is
'not the problem