Discussion Locked

Data Control Label and Access

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone know of a way to bind a Data Control Label in VB6 to an existing Access .mdb other than using the Database Name section of the Control's Properties?

5 replies

by dennisbv

You can add a data control to the form or add a data connection. They connect to your database then you can use them to feed you label.

by 1pistol

I already know how to use a data control, the problem is how to attach an Access Database to it without using the Database Name Property. If using a data connection instead is the answer, how do I use/ add it?

by trekketoo

Put a data control on your form then set the control in code.

Data1.DatabaseName = "C:\Cert\CertInfo.mdb"
Data1.RecordSource = "tblDescriptions"

The DataSource property for your textboxes or other controls you want bound to the data control have to be setup using the controls properties during design time.

Hope this helps.

Donna

This discussion is closed to new replies.