473,387 Members | 1,678 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,387 software developers and data experts.

Values can't be grabbed?

DC
I have this code:

For iTabCount = 2 To tabCtrl_Contact.TabPages.Count - 1
iGroupID = 0
sSQL = ""
For iCount = 0 To
tabCtrl_Contact.TabPages(iTabCount).Controls.Count - 1
oControl =
tabCtrl_Contact.TabPages(iTabCount).Controls(iCoun t)
iFieldIndex = 0
If Mid(oControl.Name, 1, 3) <> "lbl" Then
If Mid(oControl.Name, 1, 3) = "rad" Then
If CType(oControl, RadioButton).Checked = True Then
arrName = Split(oControl.Name, "_") ' Format
should be: prefix_groupID_index
If UBound(arrName) = 2 Then
iGroupID = arrName(1)
iFieldIndex = arrName(2)
sAnswer = oControl.Text
End If
End If
Else
arrName = Split(oControl.Name, "_") ' Format should
be: prefix_groupID_index
If UBound(arrName) = 2 Then
iGroupID = arrName(1)
iFieldIndex = arrName(2)
sAnswer = oControl.Text
End If
End If
sSQL = sSQL & _
"Field Index: " & iFieldIndex & " >> " & sAnswer
& vbCrLf
End If
Next
Next

The purpose of the code above is to trace all controls (EXCEPT label) in tab
pages, and get the value of each control.

I tried to grab the values using this statement:

sAnswer = oControl.Text

But it always bring me "blank" value, even though those controls have
values.

Any ideas where am I missing here?
Thank you,

DC

Nov 21 '05 #1
2 911
"DC" schrieb
I have ths code:
<snipped>
The purpose of the code above is to trace all controls (EXCEPT label) in
tab pages, and get the value of each control.

I tried to grab the values using this statement:

sAnswer = oControl.Text

But it always bring me "blank" value, even though those controls have
values.

Any ideas where am I missing here?


Are you aware of the fact that you have to loop through the controls
recursively?

http://www.apress.com/ApressCorporat...94266-2093.pdf

Cheers

Arne Janning
Nov 21 '05 #2
DC
"Arne Janning" <sp*****************@msn.com> wrote in message
news:eU**************@TK2MSFTNGP14.phx.gbl...

Are you aware of the fact that you have to loop through the controls
recursively?

http://www.apress.com/ApressCorporat...94266-2093.pdf

Cheers

Arne Janning

Thanks Arne, I read the article above, but it doesn't help with my case.
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: toedipper | last post by:
Hello, The following code grabs the url of a file location on the net from a db on my server for a file download. // connection to grab url of the file mysql_select_db($database_local,...
4
by: toedipper | last post by:
Hello, The following code grabs the url of a file location on the net from a db on my server for a file download. // connection to grab url of the file mysql_select_db($database_local,...
1
by: toedipper | last post by:
Hello, The following code grabs the url of a file location on the net from a db on my server for a file download. // connection to grab url of the file mysql_select_db($database_local,...
3
by: Ivan Marsh | last post by:
Hey Folks, How do I go about escaping values entered into a form so they can be dumped into a database? For the record, I have no idea how the functions I'm using to write to the database...
4
by: MLH | last post by:
It has been mentioned that a ghosted machine or a machine linked by cable modem and USB may result in my reading a MAC address other than one burned onto a NIC in the machine. That being the case,...
12
by: Paul H | last post by:
Say I have a Windows 2000 server running Terminal Services with a single file Access DB (not front end/back end) on it, could multiple users access the data base simultaneously? Paul
1
by: RDizzle | last post by:
okay. so all i am doing is changing a registration script that uses $_GET to a script that uses $_POST, but the validation script now returns NULL values for all posted vars. What's the deal? ...
1
by: corsibu | last post by:
hello , i just wanted to ask if there's anyone who could help me do the following thing : i have an empty temporary table, this table will have a row filled with data grabbed by a querry at this...
1
by: helraizer1 | last post by:
Hi folks and folksesses, In the GD2 library there is a function called 'imagegrabscreen()' and 'imagegrabwindow()', which captures a screen dump of the current window, or another one specified by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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...

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.