Changing the value of a report title

mihabaki

Registered User.
Local time
Today, 19:17
Joined
Jul 14, 2005
Messages
48
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:

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.
 
SOLVED

the problem was that I didn't use an empty textbox in the report title...

miha
 

Users who are viewing this thread

Back
Top Bottom