473,698 Members | 2,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Continuous Forms Tally on Checkboxes

I am looking for the best way to accomplish the following continuous
forms concept.

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 bound checkbox and a lable: lblCounter

The behavior that I am looking for is -- when you click the checkbox
for any group, the count for that group is reflected in lblCounter.

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

If you exceed "4" checks for a group the number should briefly turns
into a message like "All
4 Selected" and then undo the check.

I have a feeling that as simple as this sounds this is difficult task
with continuous forms.

Thanks for any suggestions,
RBolling

Jul 13 '07 #1
1 3239
On Fri, 13 Jul 2007 08:17:46 -0700, rpboll <RP****@gmail.c omwrote:
>I am looking for the best way to accomplish the following continuous
forms concept.

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 bound checkbox and a lable: lblCounter

The behavior that I am looking for is -- when you click the checkbox
for any group, the count for that group is reflected in lblCounter.

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

If you exceed "4" checks for a group the number should briefly turns
into a message like "All
4 Selected" and then undo the check.

I have a feeling that as simple as this sounds this is difficult task
with continuous forms.

Thanks for any suggestions,
RBolling
Get the count from the underlying table rather than from the continuous form's
recordsetclone. Something like -

Sub CheckBoxControl _AfterUpdate()
Dim intChecked As Integer
Dim strGroup As String

Me.Dirty = False
strGroup = Me.Group
intChecked = Abs(DSum("Check BoxField","tblM yTable","[Group]=" & Chr(34) &
strGroup & Chr(34)))

If intChecked >4 Then
Beep
MsgBox "All 4 Selected", vbInformation + vbOkOnly
Me.CheckBox = False
Me.Dirty = False
intChecked = intChecked - 1
End If

Me.lblCounter.C aption = intChecked

End Sub

Wayne Gillespie
Gosford NSW Australia
Jul 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2137
by: Mark Hannon | last post by:
I am designing a PayPal shopping cart/store for a client and have placed several of PayPal's shopping cart forms on the page to correspond with different products. Each form has a unique name though each of the form's elements have to use PayPal's required naming conventions to pass the data to their server. Many of the forms have hard-coded data in them and these have not caused me any problems. The problems I am having are with 3 forms...
0
395
by: Karl Roes | last post by:
I'm still having trouble posting follow-ups. :-( "Unable to retrieve message 7cc66112.0501041919.3a6628b4@posting.google.com" Now Turtle wrote "You'll need an extra field in the table underlying the subform." ....................hmmmmmmmmm................... I put in a field in the underlying table with a default value of 1. I created a text box which adds up the values in the new field
3
6661
by: Richard Hollenbeck | last post by:
I have the following query in my form's code: Private Function Get_Data(fieldNum As Integer) Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset strSQL = "SELECT & "", "" & AS Student, activities.activityDescription, studentScores.score FROM groups INNER JOIN (students INNER JOIN (activities INNER JOIN studentScores ON
20
10817
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of either an option button plus two text fields or a checkbox plus two text fields Am wanting to save the user entries into an underlying table. Tag property for each option button, check box or text field has the value of the key
2
2397
by: panwala_bhavesh | last post by:
Thanks in advance... I have a form displaying the results of a query in a continuous form style. I want to be able to double-click on the key field of the form (a textbox, in this case a AssetID) and use this to populate the AssetID textbox of another form. Any ideas on how to link these? Thanks! Bhavesh
5
27566
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background and select the first color. .ControlSouce =fRowNum(False) .Name = RowNum 2nd step: Add the following function to the form module: (for row numbers) Public Function fRowNum(Reset As Boolean) As Long Static I As Integer
3
2517
by: trgpham | last post by:
Hi all, I have a question and really hoping you guys can help or point me to the right direction. MY SCENARIO: I need to design a screen which show up all the questionnaires and the users can select 1 of the checkboxes (Frequency) for each question. The users can either select Never, Few Times, 1-3 Times a month, 1-5 Times a week and Everyday. I store all the questions in the database table, tblItem, and display them in a continuous...
1
10907
by: blueheelers | last post by:
I have been researching for several hours on the best way to display images in continous forms in Access 2003. For example, I want to display employee name, email, phone, and picture for each record in the recordset. I can have the pictures converted to any usable format, use OLE or linking, whatever needs to be done. So far, the 3 possible solutions I have found are: 1) OLE objects - if you don't have bitmaps associated just...
1
4310
by: Hypnotik | last post by:
Well on to my next program. The program tally's votes on 3 issues. I have a class for the interface (asks questions) and a class for adding the tallies. In main there is a counter of Tally data type. I'm unclear how to actually tally the votes. I have tried sending the counter.add function the GetIssue1 value, however this does not work. #include <iostream> using namespace std; class Interface { private: int issue1;
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.