0
Private Sub Form_Load()
With db
 .Provider = "Microsoft.Jet.OLEDB.4.0"
 .Mode = adModeReadWrite
 .Open (App.Path & "\DBAddress.mdb")
End With
End Sub

Guys that's my code and I think that code contains no error. What's happening is that when I'm starting to execute the code.

It shows a Run Time Error: Could not find file 'C:\Documents and Settings\Mendoza\Desktop\mis system\DBAddress.mdb'.

Hope that you could help me out guys. Thank you and Have a nice one to all. =)

4
Contributors
5
Replies
7
Views
7 Years
Discussion Span
Last Post by opspl_programme
0

Copy DBAddress.mdb file into your project folder.

I already have the access file in my project folder... . Why is that there still a runtime error.

0

>I already have the access file in my project folder... . Why is that there still a runtime error.

No. It is not there. Please use absolute path instead of App.Path.

.open "c:\folder\dbaddress.mdb"
0

'C:\Documents and Settings\Mendoza\Desktop\mis system\DBAddress.mdb'.

is your file in that above target folder? if yes then plz check your all connection are same as above (if you use another connection other). if yes then plz check your address bar in my computer. does it show same as above?

Edited by mike_2000_17: Fixed formatting

0

Make an executable (exe) of your vb6 project
When a project is not made into an executable the "app.path" is some other directory.

Hope this works for you.. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.