>> process of creating
- Add new Item -> Module -> OK
- Just put code that u want to access from any form.
>> using module..
- call function or procedure or anything you have declare in your module

hiiii
i m doing 1 project on news paper agency
for that i need module to connect database from Microsoft access so can you tell me how to connect database through module

please help me

Menu > Add Module > OK then Write your code/s.

You can use your module by the CALL argument of whatever you have declared in your module.

At the guy above me:

Have a try on this:

Public Dbconn As New ADODB.Connection
Public rs As New ADODB.Recordset

Public Sub DBCon()

Dbconn.Provider = "Microsoft Jet 4.0 OLE DB Provider"
Dbconn.Open "PNP.mdb" 'where PNP.mdb is the Database Access Name

End Sub

You can then just use the connection by Call-ing it

Call DBCon

And please don't hijack others post. Start your own

This question has already been answered. Start a new discussion instead.