how do i produce a report from a form

D

Duckula

Hi everyone, I need to create a report from a multi-select listbox in a form
in access 2002.

The listbox is populated from a select query, the user selects items in the
listbox on the form and print this items in a report format.

Can Anyone help thanks in advance
 
J

John Vinson

Hi everyone, I need to create a report from a multi-select listbox in a form
in access 2002.

The listbox is populated from a select query, the user selects items in the
listbox on the form and print this items in a report format.

Can Anyone help thanks in advance

You need a bit of VBA code to do this. There's a good sample at

http://www.mvps.org/access/reports/rpt0005.htm

John W. Vinson[MVP]
 
D

Duckula

Thanks John,

I have tried to simulate this coding, and I'm afraid I can't understand what
the code is doing??

What I can make out is that the code is setting up a select query, but when
I entered the data into my code the loqd as QueryDef could not be set up and
produced errors. can anyone help me get over this hurdle please.

Thanks in advance.
 
J

John Vinson

Thanks John,

I have tried to simulate this coding, and I'm afraid I can't understand what
the code is doing??

What I can make out is that the code is setting up a select query, but when
I entered the data into my code the loqd as QueryDef could not be set up and
produced errors. can anyone help me get over this hurdle please.

Copying and pasting the *sample* code won't work - it's based on their
table, not on yours! Please post the code you've entered and what
errors you're getting.

John W. Vinson[MVP]
 
D

Duckula

John, thanks for your time and guideance however I found the solution by
using a filter. The user select a number of items in the listbox on the form
accepts the selection, which opens the report and filters the report of the
selection.

Again John Thanks
 
Top