Continuous Form Record Selection

  • Thread starter Thread starter Larry Stewart
  • Start date Start date
L

Larry Stewart

I am using Access 2000 and I am attempting to add a
checkbox control to a continuous form recordset that will
allow a user to select the rows they want to print.

Then, my plan was to capture the rows that have the
checkbox selected and do my processing.

When I place a checkbox control within the detail band and
run the form, it does not allow it to be selected unless I
bind it to a column in the recordset. So, I create an
expression in the recordsource and bind it to the
checkbox. However, when I do this, and I click on the
checkbox, the checkbox is set for all rows, not just the
one I clicked on.

Again, I just want to allow the user to select the rows
they want by clicking on a checkbox field on each row. Is
there a way to do this??

Thanks,

Larry
 
Hi Larry

To do this, you will need to bind your checkbox to an *editable* column
(i.e. a table field) in your recordsource. An unbound control will have the
same value in every row (as you have discovered) and a control bound to an
expression will not be editable.

If your application does not have multiple concurrent users, then you can
add a Selected field to your table. Otherwise it gets a bit more
complicated, because you cannot allow different users' selections to
interfere with one another. Post back a reply if you need a multi-user
solution.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
 
Actually, I need a concurrent solution. If the answer is
around setting up a table by user/datetime, etc., I can do
that. I was hoping I could do something without managing
the session via a Access table.

Larry
-----Original Message-----
Hi Larry

To do this, you will need to bind your checkbox to an *editable* column
(i.e. a table field) in your recordsource. An unbound control will have the
same value in every row (as you have discovered) and a control bound to an
expression will not be editable.

If your application does not have multiple concurrent users, then you can
add a Selected field to your table. Otherwise it gets a bit more
complicated, because you cannot allow different users' selections to
interfere with one another. Post back a reply if you need a multi-user
solution.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.

I am using Access 2000 and I am attempting to add a
checkbox control to a continuous form recordset that will
allow a user to select the rows they want to print.

Then, my plan was to capture the rows that have the
checkbox selected and do my processing.

When I place a checkbox control within the detail band and
run the form, it does not allow it to be selected unless I
bind it to a column in the recordset. So, I create an
expression in the recordsource and bind it to the
checkbox. However, when I do this, and I click on the
checkbox, the checkbox is set for all rows, not just the
one I clicked on.

Again, I just want to allow the user to select the rows
they want by clicking on a checkbox field on each row. Is
there a way to do this??

Thanks,

Larry


.
 
BTW, Thank You for your quick response. I typed my last
response very quickly and it does not read very well...

If I have to bind the column to an editable column, I was
thinking of setting up a table that would have userID and
a numeric key that was assigned when the form opened.
Then, I could track for that "session" the records
selected and go from there. However, that just seems
incredibly inefficient and complex simply to have a user
select a record on a form which I could then step through
via the recordsetclone or by use of a filter command.

Anyway, if you have an easier way to have a user select
multiple rows on a form (without the whole CTRL or SHIFT
standard windows option), I would be very interested in
learning about it. The reason the CTRL and SHIFT keys
won't work is because the result will have many many rows,
and it just would not be practical while scrolling back
and forth.

Thanks again!

Larry

-----Original Message-----
Hi Larry

To do this, you will need to bind your checkbox to an *editable* column
(i.e. a table field) in your recordsource. An unbound control will have the
same value in every row (as you have discovered) and a control bound to an
expression will not be editable.

If your application does not have multiple concurrent users, then you can
add a Selected field to your table. Otherwise it gets a bit more
complicated, because you cannot allow different users' selections to
interfere with one another. Post back a reply if you need a multi-user
solution.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.

I am using Access 2000 and I am attempting to add a
checkbox control to a continuous form recordset that will
allow a user to select the rows they want to print.

Then, my plan was to capture the rows that have the
checkbox selected and do my processing.

When I place a checkbox control within the detail band and
run the form, it does not allow it to be selected unless I
bind it to a column in the recordset. So, I create an
expression in the recordsource and bind it to the
checkbox. However, when I do this, and I click on the
checkbox, the checkbox is set for all rows, not just the
one I clicked on.

Again, I just want to allow the user to select the rows
they want by clicking on a checkbox field on each row. Is
there a way to do this??

Thanks,

Larry


.
 
Hi Larry

Does it really need to be a continuous form? You might like to try one of
Stephen Lebans' enhanced listbox solutions:
http://www.lebans.com/vb_listbox.htm

If you do go for a table-based solution, then I recommend you use a table in
a separate mdb on the local hard drive. This table can be linked to your
frontend mdb on each machine. Keeping temporary tables out of the frontend
itself will minimise bloat of your frontend file and lessen the possibility
of corruption.

This table needs only contain a single field, for the PK of the record(s)
that have been selected. You can base your form on a query with a left-join
to the "selection" table, and bind the checkbox to the expression: Not
IsNull(Selection.KeyField). Place a transparent command button over the
checkbox to toggle the state by either inserting or deleting the selection
record.

Any report can then be based on the real table with an inner-join to the
selection table, which will include only the selected records.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.

Larry Stewart said:
BTW, Thank You for your quick response. I typed my last
response very quickly and it does not read very well...

If I have to bind the column to an editable column, I was
thinking of setting up a table that would have userID and
a numeric key that was assigned when the form opened.
Then, I could track for that "session" the records
selected and go from there. However, that just seems
incredibly inefficient and complex simply to have a user
select a record on a form which I could then step through
via the recordsetclone or by use of a filter command.

Anyway, if you have an easier way to have a user select
multiple rows on a form (without the whole CTRL or SHIFT
standard windows option), I would be very interested in
learning about it. The reason the CTRL and SHIFT keys
won't work is because the result will have many many rows,
and it just would not be practical while scrolling back
and forth.

Thanks again!

Larry

-----Original Message-----
Hi Larry

To do this, you will need to bind your checkbox to an *editable* column
(i.e. a table field) in your recordsource. An unbound control will have the
same value in every row (as you have discovered) and a control bound to an
expression will not be editable.

If your application does not have multiple concurrent users, then you can
add a Selected field to your table. Otherwise it gets a bit more
complicated, because you cannot allow different users' selections to
interfere with one another. Post back a reply if you need a multi-user
solution.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.

I am using Access 2000 and I am attempting to add a
checkbox control to a continuous form recordset that will
allow a user to select the rows they want to print.

Then, my plan was to capture the rows that have the
checkbox selected and do my processing.

When I place a checkbox control within the detail band and
run the form, it does not allow it to be selected unless I
bind it to a column in the recordset. So, I create an
expression in the recordsource and bind it to the
checkbox. However, when I do this, and I click on the
checkbox, the checkbox is set for all rows, not just the
one I clicked on.

Again, I just want to allow the user to select the rows
they want by clicking on a checkbox field on each row. Is
there a way to do this??

Thanks,

Larry


.
 
Hi Larry,

Graham's suggestion is the only way I can think out, it seems there is no
simpler way to do that if you don't want to modify the original table
structure. Actually the Left Join method is not very complex; I create a
sample for your reference.

1. Start Microsoft Access, open NorthWind.mdb.
2. Create a table with two columns, and fill in the data.
CustomerID, Text, Primary Key
Select, Yes/No
Note: we can copy and paste the customers table to make the process quickly.
3. Save the table with name tblselection.
4. Create a new query named tempquery
SELECT *
FROM tblselection AS a LEFT JOIN customers AS b ON
a.customerid=b.customerid;

5. Create a new form via FormWizard, open the form in continues Form, we
can see there is a checkbox in each row. Selecting the checkbox updates the
underlying table tblselection, and then you can loop the tblselection to
find what records the user selects.

Please feel free to reply to the threads if you have any concerns or
questions.




Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Content-Class: urn:content-classes:message
| From: "Larry Stewart" <[email protected]>
| I am using Access 2000 and I am attempting to add a
| checkbox control to a continuous form recordset that will
| allow a user to select the rows they want to print.
|
| Then, my plan was to capture the rows that have the
| checkbox selected and do my processing.
|
| When I place a checkbox control within the detail band and
| run the form, it does not allow it to be selected unless I
| bind it to a column in the recordset. So, I create an
| expression in the recordsource and bind it to the
| checkbox. However, when I do this, and I click on the
| checkbox, the checkbox is set for all rows, not just the
| one I clicked on.
|
| Again, I just want to allow the user to select the rows
| they want by clicking on a checkbox field on each row. Is
| there a way to do this??
|
| Thanks,
|
| Larry
|
 
Thanks to all...

I guess Access doesn't handle client-side only controls
within a recordset. Thanks for the process below!

Larry
 
Back
Top