Using Data Control
Now we will create an application that displays records
from one of the NWIND.MDB database tables. Steps to
create the application:
- Create a new application and add the data control
to the form.
- Name the data control dtaCust.
- Double click the DatabaseName property to select
the file named NWIND.MDB.
- Double click the RecordSource property and select
the Customers table from the list.
- Add a label control (lblCustName) to the form.
- Open the label's DataSource property. Now bind
the label control to the data control. The label's
DataSource property will enable you to select the
value dtaCust.
- Open the DataField property and select ContactName.
- Run the application, you will see the following:
Now you can add as many labels as you want to display
multiple columns. The extra labels simply have their
DataField values bound to specific columns in the
table.
|