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 "cmdFilter" command button on the form to change the value of the 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 "cmdFilter" command button on the form to change the value of the 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.