so perhaps someone can tell me if what i want to do is possible.

i have a bunch of radio buttons which can have different text displayed depending on whats retrieved from the database.

however i want to add code that hides any radio button that would have a 'zero' retrieved from the database.
so far this is the code i was coming up with, without getting into the nitty gritty of the actual database queries

If RadioButton1.Text = Me.HWExamsDataSet.DSExamTextA.Rows.Item.tostring = 0 Then
            RadioButton1.Visible = False
        End Ifabase entries or queries.

it looks like it may work...but is there a way to automate it so that i can put in a reference to ANY radiobutton like radiobutton(*).text? or a bunch of buttons if need be.

i know theres a way to specify additional items to a given command...just can't remember if its curly brakets etc.

6 Years
Discussion Span
Last Post by Reverend Jim

You could also put all of the radio buttons inside a container like a GroupBox and access them all by

Imports System.Windows.Forms
For Each ctrl as Control In GroupBox1.Controls

Edited by Reverend Jim: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.