Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add Reference (VB6)

    I'm an absolute beginner where it comes to the VB program and obviously totally different layout as opposed to my familiar Access.

    I have a compile error:

    Dim rs As ADODB.Recordset

    I know I have to set a reference to the library, but where do I find the list of references and set it.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Reference (VB6)

    In VB6 it is in the Project menu: Project | References...

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add Reference (VB6)

    Thanks Hans

    I see things are similar to Access, but require far more building techniques.
    I don't plan on creating anything big here, it depends how I get used to the program.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Reference (VB6)

    The great advantage of VB6 is that you can create executables (.exe) and library files (.dll) etc. But creating an interface for a database is much more work in VB6 than in Access. Lots of things that can be done in Access by setting a property have to be coded in VB6.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add Reference (VB6)

    Hans
    This is all very new to me, but I'm sure, with a little determination and <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15> help, I'll stumble through.
    I've had VB6 for some time now and never really tried to get to grips with it.
    Would you believe I acquired it from a computer fair, still boxed for

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Reference (VB6)

    If you set a reference to DAO 3.6, you can use DAO objects such as Database, Recordset, Field, etc.
    But be careful, something like

    Dim dbs As DAO.Database
    Set dbs = CurrentDb

    will fail, because CurrentDb is an Access object, not a DAO object. You will have to do something like

    Set dbs = DBEngine.OpenDatabase("C:AccessTest.mdb")

    and don't forget to close the database at the end and to set the variable to nothing:

    dbs.Close
    Set dbs = Nothing

  7. #7
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add Reference (VB6)

    Hans
    In this case, for the purpose of this form, I probably don't need DAO3.6 at all since I'm not using any recordsets or database components.

    Any way, here we go, lets see what a mess I can make !! <img src=/S/blackteeth.gif border=0 alt=blackteeth width=20 height=20>

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Reference (VB6)

    Once you have created and tested your application, you must create an installation package for it. This will install not only your application, but also all auxiliary files (such as dll's) needed to run it on the target PC. VB6 comes with an add-in Package and Deployment Wizard; it is not a very good installer, but it may suffice for use within your own company. It is located in the Add-Ins menu; if you don't see it there, select Add-Ins | Add-In Manager... and check Package and Deployment Wizard.

  9. #9
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add Reference (VB6)

    Thanks Hans
    I'll print this post for future reference and cross that bridge when I come to it.
    For now, I'll just get my feet wet a little.
    Have a good day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •