| re: filter on form with VBA
<tod4@wp.pl> wrote in message
news:1121872307.195165.155040@g47g2000cwa.googlegr oups.com...[color=blue]
> Hi,
>
> Im using such procedure on my form to filtering dates to raport:
>
>
> Private Sub wyswietlraport Click()
> Dim i As Integer
> Dim Indexgorny As Integer
> Dim warunek As String
> Dim klienci() As String
>
>
> If bpolewyboru = True Then
> For I = 0 To Lstklienci.ListCount - 1
> If Lstklienci.Selected(i) = True Then
> Indexgorny = Indexgorny + 1
> ReDim Preserve klienci(1 To Indexgorny)
> klienci(Indexgorny) = "klient = " & "'" &
> Lstdyscypliny.Column(0, i) & "'"
> End If
> Next I
>
> warunek = Join(klienci, " Or ")
> DoCmd.OpenReport
> ReportName:="raportklienci1",
> view:=acViewPreview,
> wherecondition:=warunek
> DoCmd.Close acForm, "frmFiltr1"
> End Sub
>
> This procedure is creating date box klient from where I can choose one
> or few
> value of klient and print report. When I choose a few values raport is
> printed
> with those (one raport with a few value of klient) But I would like
> when I choose a few value of klient raport was printing for each value
> separately.
> For example when I mark klient1, klient2, klient5 raport is printing
> for klient1 value first than klient2 value and klient5. Maybe someone
> had similar problem earlier and know how to change procedure so that
> to get such posibility.
> Thanks for any help
>
> Peter[/color]
Can you alter the design of the report so it produces, for example, one page
per client. This way the same code will work, just with a slightly
different report. |