Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Selection check boxes for tabular forms

瀏覽次數:1,939 次
跳到第一則未讀訊息

Rod Plastow

未讀,
2006年5月16日 清晨5:54:022006/5/16
收件者:
Here's one I have never satisfactorily solved: how do you provide check boxes
on each line of a tabular form that can act as a sort of multiple choice
selection.

Take a real life example: I enter a customer payment and display a list of
open invoices for that customer. I now want to 'tick' (toggle) each invoice
line that is being satisfied by the payment. Another example: I display a
list of players and want to 'tick' those that will form next weekend's team.

I have solved this in the past by including a dummy selection column on the
table itself or, if there is a complex query, by building a new table that
includes the dummy column and then binding the form to that table.

Any thoughts?

Regards,

Rod

Wayne Morgan

未讀,
2006年5月16日 上午8:23:442006/5/16
收件者:
If you're doing this on a continuous form (it sounds as if you are) then an
unbound control can not be set differently for each row. When you check it,
it will be checked for all rows. The problem is that there is really only
one control and it is displayed repeatedly, once for each row.

If this is something you're going to do, you've found the answer. Add a
field to the table for this selection. You can simply ignore the field when
you don't need it (i.e. in other queries of the table, etc). You can also
just hide this control on the form if you don't want to see it all of the
time. When you're finished checking the desired rows and run whatever
routine you're going to run, then run an Update Query to set all the rows
back to unchecked (False) so that your selection form will be ready for the
next time.

--
Wayne Morgan
MS Access MVP


"Rod Plastow" <RodPl...@discussions.microsoft.com> wrote in message
news:146AD108-BB77-4A57...@microsoft.com...

Rod Plastow

未讀,
2006年5月17日 凌晨1:19:022006/5/17
收件者:
Thanks Wayne,

You describe more or less how I have always handled this requirement but it
has always seemed a little inelegant. At least I now have the comfortable
feeling that I'm right.

Regards,

Rod

0 則新訊息