wierd texbox and tab control issue

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

The Situation:
I've got a form with two tab pages: tab1 and tab2.

tab1 has a button (btn1).
tab2 has a text box (txt1) which is bound to a dataset column.

Desired Behavior:
When the user clicks btn1, if txt1 contains a value, then I would like
to make a sub call. If the value is blank, I would like to show a
message box to the user.

Actual Behavior:
A value is only recognized in the textbox (me.txt1.text) if the user
first clicks onto tab2 then back to tab1.

What is going on here?
 
Maybe a way too simplistic answer, but has the data on tab2 loaded in the
circumstance you're talking about? If you step through the code what does
txt1.text show up as when it gets to the point of branching? What event
triggers tab2 to load its data?
 
The dataset (parts of which are displayed on both tab1 and tab2) is
filled initially on the form Load event.
 
Back
Top