Madd Eye
New Member
- Joined
- Jan 26, 2008
- Messages
- 13
- Reaction score
- 0
Step 1
Step 2
Step 3
Step 3a
Step 4
Step 4a
Step 1: Creating the form
Very simple to use, easy to set up and manipulate. Implement on many different projects of your choice. Doesnt require extensive knowledge of database design.
1. Start out by selecting "new project" from the File > New Project option. Resize the form and create 6 labels, 6 text boxes, 4 buttons and 1 databar from the toolbox. It should look something like this:
Step 2: Setting the form properties
Now you have to set the properties of all the buttons, text boxes, the form and the databar.
(Name) Property:
* Text Boxes (From the Top) - txtName, txtLastName, txtAddress, txtPhone, txtEmail and txtComments
* Buttons (From the Top) - cmdExit, cmdAdd, cmdUpdate, cmdDelete
* Data-bar - databar
Caption property
* Labels (From the top) - 'First Name:' , 'Last Name' , 'Address', 'Phone', 'Email', 'Comments'
* Buttons (From the top) - 'Exit' , 'Add' , 'Update' , 'Delete'
* Databar: 'Last | Previous Next | Last'
Set the text of all the text boxes to blank, just delete everything that's under the Text Property.
After you have finished, it should look something like this:
Save the form and the project; give it a name of "AddBook"
Step 3: Setting the form properties
Go to Add Ins > Visual Data Manager. Then in the visual data manager select File > New > Microsoft Access > Access 7.0. Save the file in the same folder that you have saved the form; give it a name of "AddBook_data"
Looks something like this:
Notice the two buttons are highlighted in red; they should be selected.
Step 3a
In the database Window, right click and select "New Table"
A window looking something like the one below should pop up:
Give the table a name of "AddBook". Click the "Add Field" button and add a field with the name "first, last, email, phone, address, and comments". When completed, it should look like the one above. Click "Build the Table" on the bottom.
A new field appeared in you Database window named "Addbook". Right Click and select "Open":
The fields that you have entered before are no located in that window. Now type in any 3 -5 entries. Don't forget to press "Update" and then "Add" after every entry.
Close the Visual Data Manager
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.
Downlaod it here
Step 2
Step 3
Step 3a
Step 4
Step 4a
Step 1: Creating the form
Very simple to use, easy to set up and manipulate. Implement on many different projects of your choice. Doesnt require extensive knowledge of database design.
1. Start out by selecting "new project" from the File > New Project option. Resize the form and create 6 labels, 6 text boxes, 4 buttons and 1 databar from the toolbox. It should look something like this:
Step 2: Setting the form properties
Now you have to set the properties of all the buttons, text boxes, the form and the databar.
(Name) Property:
* Text Boxes (From the Top) - txtName, txtLastName, txtAddress, txtPhone, txtEmail and txtComments
* Buttons (From the Top) - cmdExit, cmdAdd, cmdUpdate, cmdDelete
* Data-bar - databar
Caption property
* Labels (From the top) - 'First Name:' , 'Last Name' , 'Address', 'Phone', 'Email', 'Comments'
* Buttons (From the top) - 'Exit' , 'Add' , 'Update' , 'Delete'
* Databar: 'Last | Previous Next | Last'
Set the text of all the text boxes to blank, just delete everything that's under the Text Property.
After you have finished, it should look something like this:
Save the form and the project; give it a name of "AddBook"
Step 3: Setting the form properties
Go to Add Ins > Visual Data Manager. Then in the visual data manager select File > New > Microsoft Access > Access 7.0. Save the file in the same folder that you have saved the form; give it a name of "AddBook_data"
Looks something like this:
Notice the two buttons are highlighted in red; they should be selected.
Step 3a
In the database Window, right click and select "New Table"
A window looking something like the one below should pop up:
Give the table a name of "AddBook". Click the "Add Field" button and add a field with the name "first, last, email, phone, address, and comments". When completed, it should look like the one above. Click "Build the Table" on the bottom.
A new field appeared in you Database window named "Addbook". Right Click and select "Open":
The fields that you have entered before are no located in that window. Now type in any 3 -5 entries. Don't forget to press "Update" and then "Add" after every entry.
Close the Visual Data Manager
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.
Downlaod it here