Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 127
  • Last Modified:

vb.net groupbox

I have a groupbox on form1 with some options in it, is there a way to ensure at least 1 is selected without checking if an  option value is checked?
0
PeterBaileyUk
Asked:
PeterBaileyUk
  • 2
  • 2
2 Solutions
 
Fernando SotoCommented:
Whats in the GroupBox? Can you give more info on what you need. A screen shot would also be nice. Thanks.
0
 
Deepak LakkadCommented:
Hi,

Write GroupBox's Enter Event

refer following code

Private Sub GroupBox1_Enter(sender As System.Object, e As System.EventArgs) Handles GroupBox1.Enter
        RadioButton1.Checked = True
    End Sub

Open in new window


- Deepak Lakkad
0
 
PeterBaileyUkAuthor Commented:
ive attached a screenshot but i did it the way deepak suggested.

in access vba the groupbox returns a value dependant on which was clicked so thats what i was wondering.


        If OpCarBulk.Checked = True Then
            StrVehCat = "Car"
        End If
        If OPBikeBulk.Checked = True Then
            StrVehCat = "Motorcycle"
        End If
        If OPLcvBulk.Checked = True Then
            StrVehCat = "Lcv"
        End If
        If OpOthersBulk.Checked = True Then
            StrVehCat = "Others"
        End If
0
 
Deepak LakkadCommented:
Hi,


can you please explain the problem in detail?

- Deepak Lakkad
0
 
PeterBaileyUkAuthor Commented:
its ok its working I just wondered if it would work a different way i will split the points
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now