Hi
I have a report and a form (with one text field and one combo box) to filter the report "on-the-fly".
I want to add a code to the "filter" command button on the form to change the value in my report title according to the selection in the combo box.
I added the following code to the com. button:
but I get a non-specific error (or even Access crashes...)
what am I doing wrong?
thank you
m.
I have a report and a form (with one text field and one combo box) to filter the report "on-the-fly".
I want to add a code to the "filter" command button on the form to change the value in my report title according to the selection in the combo box.
I added the following code to the com. button:
Code:
Private Sub cmdFilter_Click()
Dim strPriimek As String
Dim strOrganizacija As String
Dim Druzba As String
.
.
.
With Reports![rptZavarovanec]
.Filter = strFilter
.FilterOn = True
[COLOR="Red"] .txtTitle.Value = "The new report title: " & Me.cboCombo.Value[/COLOR]
End With
End Sub
but I get a non-specific error (or even Access crashes...)
what am I doing wrong?
thank you
m.