473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using checkboxes as a Radio buttons in VB form

Hi,

I have two checkboxes : Chkcities(0) and Chkcities(1) . I want that when user checks one box by single click other box should be unchecked and vice versa.
I have used below code for this :
Private Sub Chkcities_Click(Index As Integer)
If Index = 0 Then
Chkcities(1).value = vbUnchecked
End If
If Index = 1 Then
Chkcities(0).value = vbUnchecked
End If
End Sub

I am able to solve my purpose but problem is that; now user need to double click on boxes to check or uncheck them. Is there any way in VB6 by which I can make it driven by single click.

Thanks
Santosh
Sep 29 '07 #1
3 1447
QVeen72
1,445 Expert 1GB
Hi,

It shud be :

Expand|Select|Wrap|Line Numbers
  1. Private Sub Chkcities_Click(Index As Integer)
  2.    If ChkCities(Index).Value = vbChecked Then
  3.        If Index = 0 Then      
  4.          Chkcities(1).value = vbUnchecked
  5.          Exit Sub
  6.       End If
  7.       If Index = 1 Then
  8.          Chkcities(0).value = vbUnchecked
  9.          Exit Sub     
  10.       End If
  11.    End If
  12. End Sub
  13.  
REgards
Veena
Sep 29 '07 #2
Hi Veena ,

Thanks a ton .!! Your advice solved my purpose...
One quick question.. Can we implement webservices in VB6 ? Actually we have an application made on VB6 and now we require to we add use some existing webservices ? Please let me know or If you can find some article on this , that will be of great help to me ..

Cheers
Santosh
Sep 29 '07 #3
QVeen72
1,445 Expert 1GB
Hi.

Yes u can call webServices in VB6. Though personally, I have never done in any of my projects, but it can be done.
do some googling for VB6 Webservices, u get so many links, just go thru them...


REgards
Veena
Sep 29 '07 #4

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

Similar topics

2
by: Newbie | last post by:
I currently have a set of simple calculations to determine square footage and multuply that by a dollar amount per foot. I use form fields that are filled in by the user, and then the Submit...
4
by: Carl | last post by:
When using 'name' in the form, it works, when using 'id' it doesn't. Any comments about this? By the way, is this a good method or is it better to use 'getElementById'? Carl <body> <form...
9
by: Gary | last post by:
Hello, Is it possible to dynamically update a textbox with words chosen from a list using form checkboxes and javascript? Gary
1
by: wolfing1 | last post by:
I'd like to have an 'approve' and 'reject' option for each record in a list, and a 'process' button. When this button it's pressed, then it would post to the same page which would update (or add)...
1
by: sman | last post by:
Hi, I recently read this article on About.com on how to create required fields for a form: http://javascript.about.com/library/scripts/blformvalidate.htm Everything works great except that there...
10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
2
by: Glenn | last post by:
The following script is supposed to have high categories as radio buttons and mid categories as check boxes. Clicking the radio button is supposed to select all checkboxes under it and submit the...
2
by: jimi_xyz | last post by:
I am creating a search engine and here is what i have so far.. <form class="complex-form" name="searchForm" method="post" action="Directory.asp"> <TABLE border="1" cellspacing="2"...
2
by: forbes | last post by:
Hi, I have a form that contains multiple groups of checkboxes that act like radio buttons (at the clients insistance). There is one text field that is required and 28 checkbox groups. Here an...
2
by: leifstarkey | last post by:
Hi all... My problem is I'm trying to make a form containing radio buttons and checkboxes. But on the event that one of the radio buttons is selected i want specific checkboxes to then be...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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,...

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.