wierd texbox and tab control issue

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?
 
R

Rob Oldfield

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?
 
D

dave

The dataset (parts of which are displayed on both tab1 and tab2) is
filled initially on the form Load event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top