Building text box name programically
- From: "sck10" <sck10@xxxxxxxxxxxxx>
- Date: Tue, 30 May 2006 16:26:17 -0500
Hello,
I am inserting the values for radio buttons on a form into a database.
There are 25 questions with 4 possible answers (see below). Is it possible
to pragmatically build the radio button name so I can loop through the
possibilities?
For example I would like to be able to build the rbn [01 - 25] in a loop
for:
If Me.rbn01q01.Checked = True Then strRad01 = "Poor"
If Me.rbn01q02.Checked = True Then strRad01 = "Satisfactory"
If Me.rbn01q03.Checked = True Then strRad01 = "Good"
If Me.rbn01q04.Checked = True Then strRad01 = "Excellent"
If Len(strRad01) <> 0 Then Call DBInsertUpdate("sp_web_Survey",
strDateStamp, Me.lblQ01.Text, strRad01)
....
If Me.rbn25q01.Checked = True Then strRad25 = "Poor"
If Me.rbn25q02.Checked = True Then strRad25 = "Satisfactory"
If Me.rbn25q03.Checked = True Then strRad25 = "Good"
If Me.rbn25q04.Checked = True Then strRad25 = "Excellent"
If Len(strRad25) <> 0 Then Call DBInsertUpdate("sp_web_Survey",
strDateStamp, Me.lblQ01.Text, strRad25)
--
Thanks in advance,
sck10
.
- Follow-Ups:
- RE: Building text box name programically
- From: Steven Cheng[MSFT]
- RE: Building text box name programically
- Prev by Date: Re: Retrieving dynamically added items on postback
- Next by Date: A parser error has occurred?
- Previous by thread: FileIOPermission Erro using referenced dll on shared hosting
- Next by thread: RE: Building text box name programically
- Index(es):