I've made a report that counts my customers based on type and location (district). What I want is to use a form to deside which district the query should show results for.
I'm having problems referring to the form in the query. Any help here would be great! The code is as follows:
I'm having problems referring to the form in the query. Any help here would be great! The code is as follows:
Code:
qry = "SELECT Count(*) AS Count01" & _
" FROM TblCustomer WHERE " & _
" [CustomerType] = 1" & _
[Red] " AND [District] = forms!FrmEvaluering!CtrlCombo" [/Red]
rs.Open qry, CurrentProject.Connection, adOpenStatic, adLockOptimistic
Me.LblCount01.Caption = rs!Count01
rs.Close