Create Your Own Address Book
By Roman Lebedinskiy - http://chupcha.acky.net/
LAST EDITED:
Wednesday, May 2, 2001 10:51 PM
Step 4:
Now select the databar on the bottom of your form and set the following
properties:
- RecordSource - Select the location of the Access.mbd file we created in
the Visual Data Manager
- ReadOnly - False
- DatabaseName - Select the location of the Access.mbd file we created in
the Visual Data Manager
Select Each of the text Boxes and set datasource
property to databar
Select each of the text boxes (From the top) and set the DataField property
to the corresponding name:
- txtFirst - first
- txtLast - last
- txtEmail - email
- txtPhone - phone
- txtAddress - address
- txtComments - comments
Step 4a.
Now double click on the "Exit" button we added earlier and insert
the following code:
Private Sub cmdExit_Click()
End
End Sub
Double Click on the "Add" button and insert the following code:
Private Sub CmdAdd_Click()
databar.Recordset.AddNew
End Sub
Double Click the "Update" button and insert the following code:
Private Sub Command3_Click()
databar.Recordset.Edit
End Sub
Double Click the "Delete" button and insert the following code:
Private Sub cmdDelete_Click()
databar.Recordset.Delete
databar.Recordset.MovePrevious
End Sub
Now save the project and run it. Correct all the spelling and stupid mistakes
you made and have fun.
Download Source
Return to the VB Tutorials »
Go to the VB Forums »