list records with checkboxes?

  • Thread starter Thread starter martkla
  • Start date Start date
M

martkla

hi there,

i'd like to setup a form that shows a list of the records in a table.
for each record i'd like to display a checkbox that can be checked.
when clicking on a button, i'd like to open a report and pring the
selected records.

can anybody please tell me if something like this is possible in access
and how to do it?

thanks a lot. martin.
 
Martin,
Add a Check Box field to the table first.

If the table is the Form's record source, add it to the Form
by dragging the new field from the Field List tool button onto the form.

If a query or SQL is the form's record source, add the new check
box to the query, then you can add it to the form, as above.

Make a query with all the fields you wish to show in the Report.
Include the new check box field.
Code the check box field's criteria line:
-1

Make this query the record source for a report.

Only records that have a check mark placed in this field will appear in the
report.

You'll want to clear all the check marks after running the report.
Simplest way for a new user to do this is to make an update query.
Click on the Query tab, select New.
Select the table from the query dialog box.
Click Query + Update on the Query Design Menu.

Drag the check box field from the field list onto the grid.
In the Update To: line enter 0
Save the new query.

When you run the query ALL the check boxes will be reset to 0.
 
There may be another way to do this using VBA, but I like taking the easy
route. Here is what I've done in situations like this. I created a table
with just 2 fields, an ID and a yes/no field. When I want to use the form
to select records to print, I clear out the table and append all the IDs
from my current table of records into this blank table. I call my form
using a command button so I put the code to perform the above actions in the
command button before opening the new form. The row source for my form is
this table so clicking on the Yes/No changes the value in the table. I have
a command button on this form to print. I base my report on the original
table of records linked to my new table filtered to only include records
with the Yes/No set to Yes.

Kelvin
 
ah, i see. thanks for your quick replies.

the only open question is how i can make a list with all rows of the
table so that i can just scroll up and down and just check the rows
that i want to print ...

if possible, i'd like to have a (multiselect) listbox or something like
that with a checkbox that i can click. would this be possible?

thanks a lot for your help.
greetings from austria. martin.
 
Back
Top