473,609 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Selecting multiple check boxes

3 New Member
I am using Visual basic 6 and i want to be able to select more that one response in a option group with check boxes. As it is now i can only select one response at a time. the code looks like this. The option group is fractivities

Expand|Select|Wrap|Line Numbers
  1. Private Sub FrActivities_Click()
  2. If Me.FrActivities.Value = 1 Then
  3.   Cusactivities = " Running "
  4. End If
  5. If Me.FrActivities.Value = 2 Then
  6.   Cusactivities = " Walking "
  7. End If
  8. If Me.FrActivities.Value = 3 Then
  9.   Cusactivities = " Biking "
  10. End If
  11. If Me.FrActivities.Value = 4 Then
  12.   Cusactivities = " Swimming "
  13. End If
  14. If Me.FrActivities.Value = 5 Then
  15.   Cusactivities = " Skiing "
  16. End If
  17. If Me.FrActivities.Value = 6 Then
  18.   Cusactivities = " In Line Skating "
  19. End If
  20.  
  21. End Sub
thanks
Feb 13 '07 #1
3 2686
Killer42
8,435 Recognized Expert Expert
Are you sure this is VB6? I thought options groups only worked like that in VBA. How do you create an option group in VB6?

Anyway, if you just create an empty frame then place your checkboxes in it, you can examine the .Value property of the individual checkboxes to see whether they are checked or not, rather than dealing with the "value" of the option group.
Feb 13 '07 #2
LuCnt
3 New Member
my apologies, its VBA. I will try what you suggested.
Thank you very much for your time.
Feb 13 '07 #3
Killer42
8,435 Recognized Expert Expert
my apologies, its VBA. I will try what you suggested.
Thank you very much for your time.
Fair enough. In VBA, you might find that to do it that way you need to skip the frame and place the checkboxes directly on the form. (Not sure, though - let us know how it goes.)
Feb 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2404
by: james.dixon | last post by:
Hi I was wondering if anyone else had had this problem before (can't find anything on the web about it). I have three select elements (list boxes - from here on I'll refer to them as 'the list boxes'). Users can add and remove items from the list boxes. When the users are adding and removing items, the list boxes are single
1
1713
by: Pax S | last post by:
I need a button that will check (make true) two check boxes (fields) For the record that has the focus (the record on the form that I am presently looking at). The two check boxes would be like a "sold" check box and an "add to report" check box (for print out). Also as part of this button, I would like for it to enter a date into a field such as a "date sold" field. That should be fairly simple and I could probably figure out how to do...
5
1539
by: Dave | last post by:
Hi all, Apologies if this is the wrong group. I have done a search on google but my keywords are probably no good. What I want to do is to display a list of data in a datagrid (which I have already done). At the side of the list, I want to put in a checkbox, basically to select that line.
1
2231
by: Jay | last post by:
Hi All, My users are complaining about the page refreshing when they are selecting multiple rows in a datagrid. Has anyone tried to manage this using javascript? I tried smartnavigation but that caused me other problems. Any ideas? Thanks, Jay
1
3094
by: Jim in Arizona | last post by:
I'm having dificulty figuring out how to process multiple check boxes on a web form. Let's say I have three check boxes: cbox1 cbox2 cbox3 The only way I can think of to code the possibilities is something like:
5
7419
by: purush2purush | last post by:
HI All.... cud any one provide me the code for : Selecting mulitiple checkboxes and sending mail when clicked on submit button. The checkboxes are retrived from the Mysql table .The code for the check boxes is here...... while($row = mysql_fetch_array($result))
0
1624
by: bplthebest | last post by:
Hi I have have functionality like Selecting multiple rows (without using check boxes) in Grid view by Ctrl+click (IE) and shift+click(safari and Firefox). And edit the selected rows in a panel and save the same for multiple rows. Please anybody enlighten me.. Thanks in advance
6
4661
by: woodey2002 | last post by:
Hi Everyone. Thanks for your time. I am trying to create a search form that will allow users to select criteria from multiple multi select boxes. So far i have managed to achieve a search option for 2 list boxes:- county and nationality, while trying to add a third multi select list box for qualifications search is where i encounter my problem. I've copied the working code from my working list boxes, however it cant seem to pick up the...
1
6793
by: woodey2002 | last post by:
Hi Everyone and many thanks for your time.. I am trying to begin access and a bit of VBA i am enjoying it but I have a annoying problem I just can’t get any where on. My databse mostly includes bits of code for different examples. I have one last thing to finish. I am trying to create a search form that will allow users to select criteria from multiple sources eg ,multi select list boxes , combo boxes. I have a subform showing all the...
0
8145
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
8095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8556
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
7030
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...
1
6068
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5526
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
4037
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1690
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.