Selecting records with check boxes

  • Thread starter Thread starter NoName
  • Start date Start date
N

NoName

Is it possible to select multiple records in a form using check boxes ?

Suppose I had all the records from a specific table or query displayed in a
simple form; each one with a check box next to it.

My coworker only wants certain records from that form printed in a report
and somebody else wants a completely different selction. I want them to be
able to just "check" the ones tht they want and them be able to print them.

Any suggestions on how to add the check box feature. I'm using access 97

thanks in advance

(e-mail address removed)
 
Yes, you can do this is you add a yes/no field to the table so it keeps
track of which records the user has picked.

Assming a yes/no field named IsPicked, the user checks the boxes for their
desired record. Then to get the report to print just those records, use
Criteria in the query the report is based on, or you could use the
WhereCondition of the OpenReport action in code, e.g.:
DoCmd.OpenReport "MyReport", acViewPreview, , "[IsPicked] = True"
 
Is it possible to select multiple records in a form using check boxes ?

No... but see below. A Form doesn't contain any data so you can't have
an unbound field for each record.
Suppose I had all the records from a specific table or query displayed in a
simple form; each one with a check box next to it.

My coworker only wants certain records from that form printed in a report
and somebody else wants a completely different selction. I want them to be
able to just "check" the ones tht they want and them be able to print them.

Any suggestions on how to add the check box feature. I'm using access 97

You'll need to include a Yes/No field *in the Table itself* and
display it as a checkbox on the form. The user would select records;
the Report would be based on a Query selecting those records with the
field equal to True. In the Report's Close event you could run an
update query setting the field back to False for the next user.

John W. Vinson[MVP]
 
In addition to the excellent advice by John and Allen,
here is another alternative.

I've only played with this file briefly myself, but I believe
MVP Albert Kallal has something that should work
just fine for you. Follow this link:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Download the file called "Multi Select Example."
It uses an unbound check box to accomplish the task.
 
Back
Top