Visual Basic Project with MS Access:
You have two choices to build DB project.
(i) Create MS Access File at runtime and use it.
(ii) Create VB Project for existing MS Access.
Now we’re going to see the second one. VB Project for existing MS Access.
(i) Open New Project with Standard EXE.
(ii) Goto Add-Ins from your Visual Basic menu. A VisData Manager opens.
(iii) Choose ‘File’ -> ‘New’ -> ‘Microsoft Access’ -> ‘Version 7.0 MDB’ Give a file name thats the DB name.
(iv) Right click on the Properties and press New Table.
(v) Give Table Name and click Add Field. Give Name and OK, Give names how many fields you need. And press close.
(vi) Now Press the “Build The Table”.
(vii) And Double click on the Table name and press “Add” Enter the Record Click Update. if you want.
(viii) Now close the VisData.
(ix) Now we’re moving to VB. Click on the “Data” component from you Component panel.
(x) Click on the Data Property “Database Name” Browse the DB where you created by VisData.
(xi) Now click the “Record Set” Property and select the Table.
(xii) Now Place 2 or how many Fields you need that amount of Text boxes.
(xiii) Now Make the Text1 Property’s “Data Source” as “Data1″, and the Data Field as your field in the table. Do the same for the Text2. Now Run the Project you’ll see the Records in Text boxes.
(xiv) To Command your DB. Check this
#To add a record make a command button and add the code,
data1.recordset.addnew
#To Delete record
data1.recordset.delete
data1.recordset.movefirst
#To move next
Data1.Recordset.MoveNext
#To Move Previous
Data1.Recordset.MovePrevo=ious
……
Any Problem exist contact me at whitewinter_alone@yahoo.co.in or in comments.
Now we are going to see about the Multimedia control to play a MP3 Files… Check this..
(i) Select the MMControl Component from Microsoft Multi Media Control and Microsoft Common Dialog Controls.
(ii) Click and Drag the MMControl and Common Dialog Controls.
(iii) Add 4 Command Buttons.
(iv) Now for the 1st Command button double click on the button and place the code to select a file for play…
Private Sub Command1_Click()
CommonDialog1.DialogTitle = “Select a file to Play”
On Error Resume Next
CommonDialog1.ShowOpen
file = CommonDialog1.FileName
End Sub
(v) To play the selected song take the next Command button and place the code.
Private Sub Command2_Click()
MMControl1.FileName = file
MMControl1.Command = “open”
MMControl1.Command = “play”
End Sub
(vi) To pause the song place this code for next button.
Private Sub Command3_Click()
On Error Resume Next
MMControl1.Command = “pause”
End Sub
(vii) To Stop the song place this code.
Private Sub Command4_Click()
On Error Resume Next
MMControl1.Command = “stop”
End Sub
(viii) Save and run the program. if error exist contact with me…
whitewinter_alone@yahoo.co.in
With Regards,
Pasupathi…
Post your Commands….
Next a Photo Viewer…
(i) The following is a very simple program that will allow you to build an image viewer.
The program is simple but lets you see how controls and their properties can be used.
First, start a new project with a single form on it. On that form you will want to place a Drive List Box, directory list box, File list Box., Picture Box
(ii) Now in the change event of the drive list box place this code:
Sub drive1_change ()
Dir1.path =drive1.drive
End sub
This will cause your directory list box to look at those directories that are on the drive,
you drive list box points too.
(iii) Then in your directory list box change event place this code:
Sub dir1_Change()
File1.path =dir1.path
End sub
(iv) Now your file directory list box will only look at files in the same directory that your
directory list box is pointing too.
File1_click()
Dim graphic
If right(file1.path,1) <> “\” then
Graphic = file1.path & “\” & file1.filename
Else
Picturgraphic= file1.path & file1.filename
End if
Picture1.picture = loadpicture(graphic)
End Sub
(v) Save An Start this program…
If any problem exist contact me at my mail whitewinter_alone@yahoo.co.in

Hello Pasupathi, your tutorial on database good. I tried its working good. Thanks.
can you teach me !
because i’m a begginer of using Visual basic……
i need to know how to connect vb to access or access to vb!
Ya I can help you. You’ll get information soon. Thanks for your hope.