Welcome to Dream.In.Code
Become a VB Expert!

Join 150,194 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,036 people online right now. Registration is fast and FREE... Join Now!




binding txtbox to record source

 
Reply to this topicStart new topic

binding txtbox to record source, binding using only code

jencalma
29 Sep, 2008 - 03:24 AM
Post #1

D.I.C Head
**

Joined: 13 Jul, 2007
Posts: 62


My Contributions
how can you bind a txtbox to its datafield without setting it in the property box,, using only pure code please help me,, thank you,,
User is offlineProfile CardPM
+Quote Post

thava
RE: Binding Txtbox To Record Source
29 Sep, 2008 - 06:17 AM
Post #2

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 486



Thanked: 20 times
Dream Kudos: 50
My Contributions
may i know why should you do like that
User is offlineProfile CardPM
+Quote Post

akhileshbc
RE: Binding Txtbox To Record Source
29 Sep, 2008 - 08:45 AM
Post #3

D.I.C Head
Group Icon

Joined: 26 Sep, 2008
Posts: 177



Thanked: 3 times
Dream Kudos: 50
My Contributions
Text1.Datafield="student"
User is offlineProfile CardPM
+Quote Post

jaakko
RE: Binding Txtbox To Record Source
6 Oct, 2008 - 02:03 PM
Post #4

New D.I.C Head
*

Joined: 26 Sep, 2008
Posts: 21



Thanked: 2 times
My Contributions
QUOTE(jencalma @ 29 Sep, 2008 - 04:24 AM) *

how can you bind a txtbox to its datafield without setting it in the property box,, using only pure code please help me,, thank you,,


when you have a textbox 'tText' and field in a file called 'dData' you have to move the data to the textbox by writing tText.text = data2.recordset.fields("dData") every time you move in the file.
User is offlineProfile CardPM
+Quote Post

akhileshbc
RE: Binding Txtbox To Record Source
6 Oct, 2008 - 11:00 PM
Post #5

D.I.C Head
Group Icon

Joined: 26 Sep, 2008
Posts: 177



Thanked: 3 times
Dream Kudos: 50
My Contributions
QUOTE
when you have a textbox 'tText' and field in a file called 'dData' you have to move the data to the textbox by writing tText.text = data2.recordset.fields("dData") every time you move in the file.

He is asking for binding smile.gif

If you have a DATA control and you have a field name called "student", then you can bind the textbox using:

Text1.DataField="student"
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:30AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month