Select Multiple Criteria and generate report (1 Viewer)

Invader89

Registered User.
Local time
Today, 07:21
Joined
Sep 22, 2015
Messages
29
I'm trying to generate a report based on multiple selections I make from a list box.
 
Last edited:

Invader89

Registered User.
Local time
Today, 07:21
Joined
Sep 22, 2015
Messages
29
Can't look at the sample right now, but is this appropriate?

http://www.baldyweb.com/multiselect.htm


Pbadly I've tried using your code however I'm getting some error. I think your code will work since I already have a report created in the attached db. After the selections are made i would like my report to open based on the selections I made which i think is what your code does. Could please take a look at it? Thank you so much
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:21
Joined
Aug 30, 2003
Messages
36,118
There's no db attached (other than the original, which doesn't contain the code), and "some error" doesn't give me anything to go on.
 

Invader89

Registered User.
Local time
Today, 07:21
Joined
Sep 22, 2015
Messages
29
There's no db attached (other than the original, which doesn't contain the code), and "some error" doesn't give me anything to go on.

I think your code also opens a print preview which I would only like to view just the report. Thanks
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:21
Joined
Aug 30, 2003
Messages
36,118
Well, you get a parameter prompt for ProgrammeID because it's not in the report's source query.
 

Invader89

Registered User.
Local time
Today, 07:21
Joined
Sep 22, 2015
Messages
29
Well, you get a parameter prompt for ProgrammeID because it's not in the report's source query.


I have added Program. All I'm trying to do is have the button open the Report template I already created and simply refresh itself whenever I choose new selections from the list box.
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:21
Joined
Aug 30, 2003
Messages
36,118
It's trying to print, as that's the default. Check the arguments for OpenReport and fill in the one to preview instead of print.
 

sneuberg

AWF VIP
Local time
Today, 04:21
Joined
Oct 17, 2014
Messages
3,506
Try

DoCmd.OpenReport "rptCustomersProgram", acViewReport, , "ProgrammeID IN(" & strWhere & ")"

if you haven't already
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:21
Joined
Aug 30, 2003
Messages
36,118
Note that isn't preview mode.
 

Users who are viewing this thread

Top Bottom