PDA

Click to See Complete Forum and Search --> : Change Querry in Access from VB


ermingut
Sep 21st, 2000, 05:30 AM
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!

Gary.Lowe
Sep 21st, 2000, 07:46 AM
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

ermingut
Sep 21st, 2000, 08:09 AM
Thank you!

You solved problem for me!