Steve
You appear to be my 'mentor' on various fronts at the moment, and I am
extremely grateful!
Having said that there are up to 200 reports available, some basic
investigation reveals that about half of them are not in use, and I will
consider removing them from the system (essentially they have been replaced
by improved versions, and my housekeeping has been poor!). Of the reports in
use, they logically divide into 5 very distinct groups, and so the check
boxes are displayed on 5 pages of a tab control. Given this - and my
intention to prune the list - I think I will keep to the check-box selection
format. I do understand and appreciate your multi-select listbox suggestion
though.
I am keen to establish whether it would be possible to cycle through the
check boxes, with a single command in the loop that would (if the check box
value was True) Send (i.e.email) the relevant report. It seems to me the
check box name would have to include a 'count' element (to facilitate the
loop process) and also the name of the corresponding report (in order to
'feed' the argument of the Send command). So, in English (as opposed to
VBA!) I see something like:
Reports named:
rpt summary
rpt details
etc
Checkboxes named:
1rpt summary
2rpt details
etc
(only report-selection check boxes would start with a number)
Then:
For count = 1 to 200 (soon to be 100!)
If checkbox count&"*" = True then Send (some expression that removes the
'number' part from the check box name!)
Next count
Can this be done??
Many thanks once again.
Les.
"Steve Schapel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Les,
>
> I definitely wouldn't have 200 checkboxes on a form, so that a user can
> tick 5-8 of them in order to select which reports to print. There are
> multipe alternative approaches, and deciding between them requires a
> deeper understanding of what you're doing that what I've got right now.
> But here are a couple of ideas that would be relatively easy to
> implement without major changes to your overall concept. First, make a
> table to list the names of all the reports, and then put a multi-select
> listbox on your form with this table as its Row Source. Code to
> retrieve the reports from the selections on the listbox is fairly
> standard. This is still clunky, but at least you would take up less
> space on the form. Another idea is to use a continuous view subform,
> with a combobox based on the ReportNames table, for entry of the names
> of the reports for output. Because of the combobox's AutoExpand
> capability, the entry of the report names will be quick. Hope that helps.
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> Jack Isaacs wrote:
> > HelloSteve
> >
> > The requirement is to output multiple reports - so yes, in theory, all
200
> > reports could get outputted at once. In practice, however, no recipient
is
> > likely ever to get more that 10 reports: 5-8 is normal.
> >
> > I have tried to come up with the code to output all the reports as
multiple
> > attachments to a single email, but this has proved too difficult (so
far) so
> > at least for the present time I will output each of them as individual
> > attachments to individual emails. I know this means that the recipients
will
> > receive multiple emails, but if it's only 5-8 they shouldn't mind!
> >
> > Hope that makes it clearer!
> >
> > Thanks for your continued help.
> > Les
> >
> >
> > "Steve Schapel" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >
> >>Les,
> >>
> >>Is the requirement here to only output one report at any given time,
> >>i.e. the one with its corresponding checkbox ticked? Or is the
> >>requirement to output multiple reports, i.e. all with their
> >>corresponding checkboxes ticked, so in theory all 200 reports could get
> >>outputted at once?
> >>
> >>--
> >>Steve Schapel, Microsoft Access MVP
> >>
> >>
> >>Leslie Isaacs wrote:
> >>
> >>>Hello Steve
> >>>
> >>>Thank you for your reply.
> >>>
> >>>I am under the impression (for some unknown reason!) that it would be
> >
> > better
> >
> >>>to run the process as a VBA procedure than as a macro: would you agree?
> >>>Assuming so, if I named all the checkboxes "1", "2", ..."200" (say),
> >
> > could
> >
> >>>the procedure cycle through them with some kind of 'While' loop, or a
> >
> > 'For
> >
> >>>count = 1 to 200' loop? Perhaps I need to create a table of the report
> >
> > names
> >
> >>>and corresponding checkbox numbers, to refer to? Or , if the checkboxes
> >>>themselves were named exactly the same as their corresponding reports,
> >
> > could
> >
> >>>I somehow use that name to output the corresponding report - if, of
> >
> > course,
> >
> >>>the value is True?
> >>>
> >>>I'm casting back here to the days when I learnt a bit about programming
> >
> > (in
> >
> >>>Basic, and AlgolW I think it was), and I seem to think that all this
> >
> > should
> >
> >>>be reasonably 'do-able'. I would be very grateful for your ideas and
any
> >>>help with the coding.
> >>>
> >>>If I were to use the code you suggested, how exacly would I refer to
the
> >>>checkboxes - would I need to include the form name, or would
> >>>Me.NameOfFirstCheckbox be enough?
> >>>
> >>>Many thanks
> >>>Les
> >>>
> >
> >
> >