How to create database in & connect MS-ACCESS with VISUAL BASIC?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kumarg
    New Member
    • Sep 2006
    • 3

    How to create database in & connect MS-ACCESS with VISUAL BASIC?

    how to create database in Ms-Access & how to connect that database with
    Visual Basic-6.0? Kindly let me know in detail.
  • Reena83
    New Member
    • Sep 2006
    • 32

    #2
    Hi Kumar,

    I registered today looking for help, but seems ive been trying to help everyone. Im not fond of programming but hope this helps:

    In Microsoft Access>Under help> type: Create an Access database

    It gives you lots of help:)

    Did you actually browse through this to find help first? Hmm I just posted something. Anyways:

    About the connection part:

    Code:
    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 = Babylon.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
    I learnt it this way first now Im doing systems implementation so learning new ways. I liked the earlier one better. If you still need just send me an email:

    and I will try and send some of my assignments.

    Reena
    Last edited by Niheel; Feb 28 '11, 04:41 PM.

    Comment

    • kumarg
      New Member
      • Sep 2006
      • 3

      #3
      Hi Reena,

      Thanks a lot for giving me information which i needed, but i didn't try this ever
      before since i am new to Ms-Access. Send me more details about creating
      connection between Ms-Access & Visual Basic, if you have.

      Thank you once again.

      Bye

      Comment

      • Reena83
        New Member
        • Sep 2006
        • 32

        #4
        Originally posted by kumarg
        Hi Reena,

        Thanks a lot for giving me information which i needed, but i didn't try this ever
        before since i am new to Ms-Access. Send me more details about creating
        connection between Ms-Access & Visual Basic, if you have.

        Thank you once again.

        Bye
        Hi Kumar,
        Just want to know did the information help you? Did you have any problems or was everything ok? Actually if you let me know then I can see about finding some other ways to help you out in terms of links etc!

        Reena

        Comment

        Working...