Results 1 to 3 of 3

Thread: Change Querry in Access from VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Location
    SLOVENIA, Europe
    Posts
    110

    Question

    How can I change query definition in Access database from VB. I need this for upgrading current database tu new version.

    I have to add one more field from table that is already define in this query.

    example:

    Current

    select tab1.field1, tab2.field2 from tab1, tab2 where ....

    changed to

    select tab1.field1, tab1.field2, tab2.field2 from tab1, tab2 where ....

    Thanx!
    Ermin Gutenberger

    VB.NET 2010

  2. #2
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    ermingut

    have a look at Querydefs if you are using DAO or the equivilant if you are using ADO.

    This will enable you to delete the existing one and create a new one with the same name but with the criteria you specify.

    Hope this is of use
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Location
    SLOVENIA, Europe
    Posts
    110
    Thank you!

    You solved problem for me!
    Ermin Gutenberger

    VB.NET 2010

Posting Permissions

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



Click Here to Expand Forum to Full Width