There's a problem with binding to an invisible textbox control

When binding the data from database to textbox control, which is visible - everything is ok, but if I change visible=false, the control doesn't receive the binding value, but there's always textbox1 :(
Similar problem appears when the control is on other tabpage than shown at the moment. Only when I go to the given tabpage, the control receives binding value.
How to solve it?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It may suffer the same problems as trying to set the focus to an invisible text box -- you might have to make the textbox visible before it can be a legitimate destination.  I guess possible workarounds could be:

   -   Making the textbox really small, instead of invisible.
   -   Matching the BackColor and ForeColor properties to that of the Form
   -   Placing your data reader textbox on another, minimised form and copying across



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Stephen MandersonSoftware EngineerCommented:
Hi there, I have had similar problems. What i done to solve them is make a connection to the db manualy, and get that to fill the data of the text boxes. You could try this in the main page of the form load.

Private Sub Form_Load()
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset

conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DatabaseLocation.mdb;"

sqlstr = "Table"

rs.Open sqlstr, conn, adOpenKeyset, adLockOptimistic

with rs
             .Fields("Text1")    =   Text1.text
             .Fields("Text2")    =   Text2.text

End With

Set rs = Nothing
Set conn = Nothing
End Sub
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.