jdb said:
I am a novice user, and know how to do simple queries.
I have a table of 1,500 records, and would like the ability to select
individual records for a report. Say, for example, I want to print labels
for records 1, 432, 765, 134, and 1487. Those records may have nothing in
common to do a query.
Is there a way to do this? In my mind, their should be a way to create a
query (or table or form or report) that shows all the records, allows you to
highlight the records you want, then saves the results.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yes, there is a way to do this. It takes some VBA coding.
If you want to just run labels from a form you can put a command button
on the form that, when clicked, runs a label report that reads the data
from the form and uses it as its criteria. (Hint: Me.Filter = RecordID
= Forms!frmData!txtRecordID Me.FilterOn=True). This is a one-at-a
time method.
For multiple records I set up the report to open a criteria form that
puts the possible records in a ListBox. Sometimes the criteria form has
it's own criteria that the user has to fill-in to display those records
in the ListBox. This allows the user to select which records they want
in the Report. When the user has finished selecting possible records
from the ListBox they click the Run command button I've conveniently
placed on the criteria form. The report then runs using only the
records the user has selected. The report reads the data from the
criteria form's ListBox, sets up its Filter, or changes its
RecordSource, and displays the results.
There are resources on the Web that describe in more detail how to do
this. Also, the Goggle groups archive has this described many times in
many posts. Try searching there for the code. If all else fails there
were the famous _Access Developer's # Handbook_ by K.Getz, et. al.
which I believe are out of print. They used to have a web site, perhaps
it still exists.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBR74Ei4echKqOuFEgEQK6ewCeKLCNtjFrV5y6XDzh7DGoC3B/RiMAn3LJ
PZzprNox6e7qsR5VaS9etlgX
=hN+5
-----END PGP SIGNATURE-----