DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Create MS Access query with VB?

  1. #1
    Join Date
    Aug 2004

    Create MS Access query with VB?

    [Originally posted by Lee Howard]

    I maintain multiple Access 97 and 2000 databases and occasionally need to make the same changes to all of them by adding/modifying a query/form/code/report.˙ Is there a way to automate this from VB (not VBA) and have it work on the different versions?˙ I am trying to write a script to automate the process, but I am having problems with different environments.˙ Some of the machines are NT and some are 2000 pro.

  2. #2
    Join Date
    Aug 2004

    Re:Create MS Access query with VB?

    [Originally posted by Mike Lyons]

    Queries are fairly easy to add or modify via DAO code.˙ Just open the existing QueryDef object, or create a new one and set its SQL property.˙ Managing tables is a little more complex but still doable.˙ You have to keep indexes in mind if modifying a table.

    The biggest problem you will face is with macros, modules, forms and reports, as these are managed by Access as proprietary object types, not as DAO objects.˙ Best suggestion I have is to use VB as an automation controller to open Access via ActiveX and control the Access object model.

    The second issue is in the maintenance of two versions of Access.˙ You will have to detect which version of Access you need to work with.


  3. #3
    Join Date
    Aug 2004

    Re:Re:Create MS Access query with VB?

    [Originally posted by m.posseth]

    or what you could also do is , start some serious coding , ( as you stated that you wanted to use VB(6) to acomplish the task )

    and use adodb to connect to the databases and perform your tasks

    if you use the jet oledb4.0˙ provider you can open all access˙ versions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center