Hi Steve
I think you have missunderstood what I said. The list box is a subdata
sheet on the form (table) and each report in the table is a record of a
report that exists in the reports folder. I first made made the table
consisting of an autonumbering key, Data text, consisting the name of the
report and a 3 collumn consisting of a description of the report. Once the
table was created I then went to the form and used the create list box from
table wizard.
As for the report I don't want to print multi reports at once I just want to
be able to choose a report from the list by highlighting and then click on
the command button below to preview or print the report depending on how what
I the command button has been set up to do which could be either print or
preview, that decision has not been reached yet. All I need to know is how I
can do this.
As I said you will understand what I want to do if you had a look at the
classroom Management data base which show how this type of function works.
Its just I am not able to figure it out from the template. As I said I can
e-mail you the template so you can have a look.
"Steve Schapel" wrote:
> Wendy,
>
> There area few questions here.
>
> If the report preview opens via the button on the form, but not when you
> run the macro directly, well, even when you run the macro directly the
> form has to be open, there has to be an item selected in the listbox,
> and probably the form itself needs to be the active object. So I
> wouldn't worry about this - in normal usage you won't be directly
> activating the macro anyway, no?
>
> It is certainly possible to have more than one report previewed at a
> time. However, I have never done this, and would tend to avoid this
> approach. I am still not clear whether you want to select one report
> from the list, and then preview/print it, or whether you want to process
> more than one report simultneously. These are two different scenarios.
> If you want to do multiple reports, based on selections in a
> multi-select format listbox, then I don't know of a way to do this with
> a macro. As far as I know, it would require VBA code instead. So, can
> you post back with details of the macro you are trying so far?
>
> --
> Steve Schapel, Microsoft Access MVP
>
> Wendy F wrote:
> > Steve
> >
> > The Form will have on it a list box from a table listing with say 5 reports
> > (the table listing is the names of the reports from the reports folder with a
> > autonumbered key).
> > What I want to do is be able to click on one of the reports from the list
> > and then click the command button underneath the listing which will open the
> > report to preview if not preview it, to print it. There will also be another
> > command button which will enable me to edit the report listing so that I can
> > if necessary delete a report as it's no longer needed or add a report to the
> > listing from the reports folder. I don't have a problem with the edit report
> > command button as that works and takes me to the table listing so that I can
> > add or delete.
> > It's being able to open one of the chosen reports from the listing that is
> > the problem. I can set up one report to view, and that's fine if I don't
> > need to have a choice from the list, but I would like the person using it to
> > be able to choose from the list and be able to preview or print the report
> > they choose from that list.
> >
> > Hope this explains what I need. I am sure it can be done. As I have seen
> > something similar in a Access template database called Class Room Management
> > Database. I had a look at it but was unable to figure it out. it used a
> > group macro call reports macro, but when you ran the macro, it gave me a
> > message about there being no report of that name. But then when you clicked
> > on the button on the form in user view it worked and opened up the report for
> > previewing. So I have not been able to figure it out. Probably because as I
> > said I am not that good with Visual basic. If you would like me to e-mail
> > you the template database so you can see what I mean you will have to supply
> > me with you e-mail address.
> >
> >
>
|