SELECTING SPECIFIC Reports from a DataSheet to be Used in a Report ??

  • Thread starter Thread starter kev100 via AccessMonster.com
  • Start date Start date
K

kev100 via AccessMonster.com

I have a Form which displays data (in datasheet format) from a query.

The basics all work well (query, displaying of data, etc).

However, part of the criteria used to select records in the datasheet (which
resulted from a query) cannot be coded...it depends on too may fuzzy
variables...so....those "additional criteria" cannot simply be included in
the initial query.

When this Form displays (in datasheet fromat)....it would be GREAT if the
user could select the records they wanted to be included in a report.

For example....the query may produce:

Name Phone Height

Tom 555-555-11111 5'6''
Mary 555-555-11115 5'3''
Will 555-555-11113 6'2''
Jim 555-555-11118 5'11''
Nancy 555-555-11112 5'4''

.....which is displayed in DataSheet form.

The user needs to be able to somehow select the records for Mary, Jim, and
Nancy (preferrably by clicking on them) then click a command button (or
something) which launches a Report that uses only those records they just
selected.

Any advice greatly appreciated.

THANKS
 
i would be inclined to overcome the 'fuzzy' bit by including an additional
checkbox field ("choose") in your table/queries

once your query(s) have sifted out the main criteria - the user can simply
tick specific records they want on the report

include the report filter "choose = True"
 
Thanks for that info......I checking out both items....and it looks like
either may do just what is needed...

I think I understand the concept, but have never used check/list boxes in
Access.

I can see where they can be added in a form....is that the best place....or
can/should the check box field be added in the Query Design?

I did put a check box in the FORM (which is tied to a particular query).
Under properties/data/control source, I just tied it to the NAME field in the
form.

However, when the form is opened, all the boxes are already checked and I
can't UN-check them.

Do I need to adjust the default value.....or should the check box even be
bound to a record?

I'm hoping the user will be able to display the form with the boxes Un-
checked....be able to check the boxes of the records they want...then produce
a report using only those records.
 
the checkbox method i posted is totally different method to the listbox
method described by duane

to use the checkbox method you need to include an extra field in your table,
call it "choose" & set it as yes/no (checkbox field) - the checkboxes will
default to null (empty/unticked)

this checkbox/choose field should be included in your form record source
(table or query) - and the checkbox ('choose') included on the form (just
like all your other fields) - it will already be bound to the 'choose' field

filter your form by which ever method you are currently using - the user
will then be able to tick any specific fields they want to include in a
report

just set the report filter to "choose = true" - the report doesn't need to
based on any query - the filter will do it all
 
That would work perfectly....unfortunately, I cannot add or remove fields in
the core table.

It is "set in stone" so to speak, at it's source.

I was hoping that a check box could be added to the initial form that
displayed the information and somehow tied to each record.

I also tried to add it just as some sort of "unbound field" in the query
upon which the form is based...but when the query is run, it prompts the user
to input a value for that field


Is there any way to insert a check-box selector "post-table creation"...or is
this function simply not possible given that limitation?

Thanks much for the responses


JethroUK© said:
the checkbox method i posted is totally different method to the listbox
method described by duane

to use the checkbox method you need to include an extra field in your table,
call it "choose" & set it as yes/no (checkbox field) - the checkboxes will
default to null (empty/unticked)

this checkbox/choose field should be included in your form record source
(table or query) - and the checkbox ('choose') included on the form (just
like all your other fields) - it will already be bound to the 'choose' field

filter your form by which ever method you are currently using - the user
will then be able to tick any specific fields they want to include in a
report

just set the report filter to "choose = true" - the report doesn't need to
based on any query - the filter will do it all
Thanks for that info......I checking out both items....and it looks like
either may do just what is needed...
[quoted text clipped - 18 lines]
checked....be able to check the boxes of the records they want...then produce
a report using only those records.
 
Use a multi-select list box. You can find sample code on how to use this at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.
--
Duane Hookom
MS Access MVP

kev100 via AccessMonster.com said:
That would work perfectly....unfortunately, I cannot add or remove fields
in
the core table.

It is "set in stone" so to speak, at it's source.

I was hoping that a check box could be added to the initial form that
displayed the information and somehow tied to each record.

I also tried to add it just as some sort of "unbound field" in the query
upon which the form is based...but when the query is run, it prompts the
user
to input a value for that field


Is there any way to insert a check-box selector "post-table creation"...or
is
this function simply not possible given that limitation?

Thanks much for the responses


JethroUK© said:
the checkbox method i posted is totally different method to the listbox
method described by duane

to use the checkbox method you need to include an extra field in your
table,
call it "choose" & set it as yes/no (checkbox field) - the checkboxes will
default to null (empty/unticked)

this checkbox/choose field should be included in your form record source
(table or query) - and the checkbox ('choose') included on the form (just
like all your other fields) - it will already be bound to the 'choose'
field

filter your form by which ever method you are currently using - the user
will then be able to tick any specific fields they want to include in a
report

just set the report filter to "choose = true" - the report doesn't need to
based on any query - the filter will do it all
Thanks for that info......I checking out both items....and it looks like
either may do just what is needed...
[quoted text clipped - 18 lines]
checked....be able to check the boxes of the records they want...then
produce
a report using only those records.
 
Duane,

Cool page....looks like there are several handy items there.


I had a hard time getting my mind around the multi-select box sample.

With this current situation, the list could me 20 plus records long and the
user would need to be able to select a given record(s) by actually clicking
directly on the record itself (on a check-box or something).

As a template for this....could the unbound box in the upper left of that
form (titled "Employee Name") be modified for this?

I'm thinking such could display all of the fields from an existing query...
then....the user could click on the records they needed from that query
(highlighting each when clicked)....then a button added to display a report
that , when clicked, would only use the selected (highlighted) records.

Could it been used in that manner?

Thanks very much....
 
The demo is for using a multi-select list box. Don't you want to use a list
box? I'm not sure what you are referring to "the unbound box in the upper
left".

I wouldn't add a field to any table to allow multi-selecting. This would not
be practical in a multi-user application.
 
I wouldn't add a field to any table to allow multi-selecting. This would not
be practical in a multi-user application.

Agree.....I am not able to add a field to the core table of my current app.
But, I was thinking that maybe one could be added to a query (one of those
Expr1 columns that only exists when the query is run, but is not a field in
the actual core data table).

The unbound item I am referring to is from the sample Access example named
"Listbox with Multiselection used in Query" at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

When I opened the form "frmMultiselectListDemo" then go in Design mode, the
box named "Employee Name" in the upper left corner under the "Demonstration"
tab displays the word "Unbound"

I'm wondering if it could be modified to display all of the fields from an
Existing query...then....the user could click on the records they needed in
that query (highlighting each when clicked)....then a button added to display
a report that would only use those selected (highlighted) records.

The major function I'm badly needing is something that allows the user to
select various records from the results of an existing query (by clicking on
that record's line in the displayed results) then, run a report that will use
only those selected records.

The box in the upper left on the form in the example "Listbox with
Multiselection used in Query" seems the closest item that enables this
function. However, that item does not appear to be bound to an existing
query...it seems to actually perform a query itself.

I may be approaching this from the wrong angle....in that I'm not very
familar with form programming. My major need is that "clickable" function.
The feature that allows a user to select certain records from those displayed
in a query's results.

And further....I may be compounding my wrong assumptions in thinking that
this "clickable selecting" feature must be created seperately from the query
itself......can this "clickable selecting" feature/action be built right into
the existing query?

Thanks very much....
 
(1) You can't add a column to a query and expect to update it for individual
records. That's why you need to use a list box.
(2) The unbound control is the list box. You can include many fields as long
as you change some of the properties such as the Column Count and Column
Widths.
(3) the Row Source of the list box is a query
(4) you can replace the Row Source value with the name of a query
(5) this describes a list box
(6) the query can be displayed with a list box
 
Back
Top