473,404 Members | 2,114 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,404 software developers and data experts.

Bound textbox not filled if tabPage has not been viewed

Tom
I have a form with a tabControl with 6 tabPages. There are
textBoxes on all the tabPages that are bound to a dataset.
The user can click a modify button, edit whatever
textBoxes they want and then click an OK button. The OK
button handler loops over all the textBoxes on all the
tabPages to validate their contents.
The problem is that the textBoxes on any tabPage which has
not been viewed appear empty to the code. It appears that
VB does not fill in bound textBoxes until the tabPage is
viewed (the tab clicked on by the user). Hence my
validation code thinks these textBoxes .text properties
are null and complains. I have kludged around this by
having the validation code select each tabPage in turn.
This works, but the user sees all the various tabPages
rapidly exposed after they hit the OK button.
Is there a better solution?
Thanks
Nov 20 '05 #1
4 2180
Hi Tom,

It appears that
VB does not fill in bound textBoxes until the tabPage is
viewed (the tab clicked on by the user).

Right, do not use the value in the textbox however the underlaying data.

I hope this helps?

Cor
Nov 20 '05 #2
Tom
It confirms what I suspected.
Most, but not all of the textboxes are bound to columns in
a dataset. I presently loop over all the controls as a
convenient way to do the validation. It avoids having a
bit of specific code for each column.
Is there an easy way using only the information from the
textbox object (including the binding information) to get
the value of the underlying data? If so then I could
manage to make this work without a major architectural
change.

thanks
Nov 20 '05 #3
Hi Tom,

Show some code how you fill your textbox (probably bound it), than I try to
tell you how you get your information from the source, mostly that needs
less (more unified) code.

Cor
It confirms what I suspected.
Most, but not all of the textboxes are bound to columns in
a dataset. I presently loop over all the controls as a
convenient way to do the validation. It avoids having a
bit of specific code for each column.
Is there an easy way using only the information from the
textbox object (including the binding information) to get
the value of the underlying data? If so then I could
manage to make this work without a major architectural
change.

thanks

Nov 20 '05 #4
Dear Tom,
Can you solve the problem now ????
I got this same problem also, but I can't seek any solution

From agnes
"Tom" <an*******@discussions.microsoft.com> ???
news:2e*****************************@phx.gbl ???...
I have a form with a tabControl with 6 tabPages. There are
textBoxes on all the tabPages that are bound to a dataset.
The user can click a modify button, edit whatever
textBoxes they want and then click an OK button. The OK
button handler loops over all the textBoxes on all the
tabPages to validate their contents.
The problem is that the textBoxes on any tabPage which has
not been viewed appear empty to the code. It appears that
VB does not fill in bound textBoxes until the tabPage is
viewed (the tab clicked on by the user). Hence my
validation code thinks these textBoxes .text properties
are null and complains. I have kludged around this by
having the validation code select each tabPage in turn.
This works, but the user sees all the various tabPages
rapidly exposed after they hit the OK button.
Is there a better solution?
Thanks

Nov 20 '05 #5

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

Similar topics

4
by: Aaron Ackerman | last post by:
I am using typed datasets in an N-Tier Windows app using VB.NET. I know this posting cannot be fully explained in a single post that is why I am asking for someone to point me to a real world...
3
by: M O J O | last post by:
Hi, Maybe this question has been asked before, but I've searched the net without finding any answer. I create a new solution, put a TabControl on Form1, create a TabPage and a put a TextBox...
3
by: Hai Nguyen | last post by:
Hi All I have a textbox want to mask as phone box. How can I do it? Thanks
7
by: Andrew McKendrick | last post by:
Hi, I've noticed a bug in VB.NET (latest .NET Framework)... - I have a TabControl on a form with several tabs. - Each tab contains text boxes that are bound to fields in a data source...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
5
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but...
2
by: cjard | last post by:
Suppose: A TextBox is bound to a BindingSource, which is bound to a DataTable A BindingNavigator is used to alter the current row being looked at by the BindingSource (i.e. Nav's NEXT button is...
0
by: ahmadbaseet | last post by:
Hello all I am new to VB.NET. I am trying to create dynamically objects and giving them the event handles. Something like this Dim NewTab As New TabPage Dim NewTextBox As New TextBox Dim...
7
by: robert.waters | last post by:
I have an Access database frontend linked via ODBC to a large (gigabytes) mysql database. I need to view a large amount of data in a a textbox (variable up to 300K), but I receive a 'there isnt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.