Tuesday, December 11, 2007

How to work the ADD Button to add to database

How to work the ADD Button to add to database

To work the ADD Button to add to database

ADD Button is used to add the new record to the database.

Step 1:

Add a Command button to form:

Step 2:

Set the Caption Properties:

Caption=ADD

Step 3:

Double click on the button and write down the programming codes:

Private Sub Command5_Click()

Adodc1.Recordset.AddNew

Text2.SetFocus

End Sub

In this example, the button will add the new entries from the Textbox2 directly to the database file.


No comments: