Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing a report with a form

Status
Not open for further replies.

mihabaki

Technical User
Apr 8, 2003
8
SI
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:

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

I used an empty textbox in the report title and now it works...

m.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top