Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Binding & Access

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
0
0
GB
My control will eventually end up in access reports. On my control I have a text box which I want to be filled with a value from a field in an Access table.

First I set up a property:


Public Property Get TestID() As String
TestID = txtTestID.Text
End Property

Public Property Let TestID(ByVal New_TestID As String)
txtTestID.Text() = New_TestID
PropertyChanged "TestID"
End Property


I then checked:

[ul]
[li]Property is data bound[/li]
[li]This property binds to DataField[/li]
[li]Update immediate[/li]
[/ul]

in the Procedure Attributes dialog.

What I need to know now is how do I actually bind the field in Access itself. When I goto my control's properties (in Access) and click on the other tab I can see my "TestID" property and I can change it there but how do I link it to a table or query?

Any advice would be welcomed with open arms,

elziko
 
Hi.

Do you have an ADO connection (control) to the database?

Have you tested the connection?

There are TWO types of data-bound controls available in VB6.
Try the other one!

You have to set both the connection-control name and the data field name for your text box, for it to be data bound?

happy hunting,
Gzep.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top