Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Wednesday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Jun 28, 2026
Ad icon
QA Engineer Intern
pramukag
Updated:
Jun 28, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
Who is So familiar with MS Access
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="GTRZ" data-source="post: 1192981" data-attributes="member: 1"><p>conenct Access db from Visual Basic or from what?</p><p></p><p>If its from Visual Basic</p><p></p><p>Option Explicit</p><p>'declare global variable</p><p>Public cnnDb As New ADODB.Connection</p><p></p><p>Public varInvNo As Long </p><p></p><p>Sub Main()</p><p> 'change into the project directory</p><p> ChDrive Left(App.Path, 2)</p><p> ChDir Mid(App.Path, 3)</p><p> </p><p> 'open the database</p><p> cnnDb.Open "Provider = Microsoft.Jet.OLEDB.3.51;" _</p><p> & "Data source = dbname.mdb"</p><p> MsgBox ("Connection is now open")</p><p> </p><p> 'load the main form</p><p> frmInvoicesView.Show 1</p><p> </p><p> 'close the database</p><p> cnnDb.Close</p><p> MsgBox ("Connection is now closed")</p><p> </p><p>End Sub</p></blockquote><p></p>
[QUOTE="GTRZ, post: 1192981, member: 1"] conenct Access db from Visual Basic or from what? If its from Visual Basic Option Explicit 'declare global variable Public cnnDb As New ADODB.Connection Public varInvNo As Long Sub Main() 'change into the project directory ChDrive Left(App.Path, 2) ChDir Mid(App.Path, 3) 'open the database cnnDb.Open "Provider = Microsoft.Jet.OLEDB.3.51;" _ & "Data source = dbname.mdb" MsgBox ("Connection is now open") 'load the main form frmInvoicesView.Show 1 'close the database cnnDb.Close MsgBox ("Connection is now closed") End Sub [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom