Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

Checkbox tally on Continuous Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
robboll - 11 Jul 2007 22:19 GMT
I am looking for the best way to accomplish the following Continuous
Forms concept.

Given:  There are Five Groups A, B, C, D, E

Each group has eight members:  a, b, c, d, e, f, g, h

Each member is seen as a row in a continuous form like:

A a
A b
A c
.
.
.
A h
B a
B b
.
.
.

Each row (member) has a selection checkbox and a lable

The behavior that I am looking for is -- when you click on a checkbox
for any group, the count for that group is reflected in it's lable.

Using Group D as an example, if you check member D b (and it is the
only member of that group selected) then D b's lable shows "1"  -- if
you then select member D g the label updates to "2" and so on until
your reach "4".   If you de-select member D b it's label value
disappears and the value for Group D is refreshed with the total
number of checks for Group D.

When you exceed "4" the number briefly turns into a message like "All
4 Selected" and then back to a "4".

I was thinking of a function using dlookup that accomplishes this, but
I don't want to reinvent the wheel if there is a better method of
letting the user he's exceeded the count for each group.

Thanks for any suggestions,

RBolling
Mr. B - 11 Jul 2007 23:43 GMT
> I am looking for the best way to accomplish the following Continuous
> Forms concept.
[quoted text clipped - 40 lines]
>
> RBolling

I think that the answer to your questions depends on wheather or not
your group controls are bound or unbound.

If they are bound then using the DCount function might work.  On the
other hand, you could declare a module level variable to hold a value
that you would then increment or decrement as the use makes
selections. You can then display the number from the variable or any
other info you need to show with it.

If you form always opens with default values for each of your group
controls then just starting with a zero value in the variable would
work, but if the form stores the values that are selected the you may
need to put some code in the On Current event of your form that will
check the values of all of the group controls and set that value to
the variable before users start to make selections.

HTH

Mr B
robboll - 12 Jul 2007 21:35 GMT
> > I am looking for the best way to accomplish the following Continuous
> > Forms concept.
[quoted text clipped - 62 lines]
>
> - Show quoted text -

Okay -- I give up.  I was the one who brought up using DLookup as a
solution, but doesn't that just bring back one value based on another
value.  If I did a dlookup on a State and Abbreviations table I'd
enter AZ and the DLookup result would bring back Arizona.  How would
you use DLookup to count the number of members in one of the groups?
BTW these are bound fields.

Thanks

RBolling
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.