Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you connect to a access db using code

Status
Not open for further replies.

Oliver2003

Technical User
Apr 19, 2003
144
GB
Hi,
I'm looking for some basic info on connecting to a access 2000 database through code and navigating, adding, deleting records.

I have the basic idea that I need Jet 4.0 as the provider and the connection below,

Dim db As Connection
Set db = New Connection
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\db3.mdb;"

But after that i'm lost;

How do I set which table to look at, the fields, display them in controls on a vb form and then navigate through them?

I await your positive reply, at the moment I am just trying to find out if vb will do the job I want. I normally use ms access as my front and back end to db.

Cheers.

 
Go to Add-ins in your IDE, Add-in manager, then load Data Form Wizard. Go back to Add-ins on the menu, then select Data Form Wizard. Follow the wizard, and it will create a project for you to get you started.



Rob
 
Cheers for the reply Rob, that how I've found out what I know so far - I think i'm getting there just need more practice!

Would you know how to connect to a access database with access security *.mdw file through code i.e specifying where the *.mdw file is?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top