Replace a query

C

ChoonBoy

How can I replace a query in another database.mde?

I have in C:/Test/database.mde

I want to replace a query "qSales" in database.mde from another mdb or mde.

I am thinking along this line

Click button - "qSales" is removed and new "qSales" is replaced.

Thanks in advance.
 
L

Linq Adams via AccessMonster.com

You cannot make design changes to mde files. To change this you have to have
access to the original mdb file.
 
L

Linq Adams via AccessMonster.com

Well, Bonnie, the motion's been made and seconded, shall we take a vote?

;0)>
 
D

Dirk Goldgar

ChoonBoy said:
How can I replace a query in another database.mde?

I have in C:/Test/database.mde

I want to replace a query "qSales" in database.mde from another mdb or
mde.

I am thinking along this line

Click button - "qSales" is removed and new "qSales" is replaced.


I have to differ with those who have posted saying you can't do this. While
you can't change the design of forms, reports, or modules in an MDE, you can
change tables and queries. Suppose you have a database you're running this
update from, and that database has a query "qSales" that you want to replace
the like-named query in "C:/Test/database.mde". This line of code will do
it:

DoCmd.TransferDatabase acExport, _
"Microsoft Access", "C:/Test/database.mde", _
acQuery, "qSales", "qSales"
 
B

bhicks11 via AccessMonster.com

Okay - I second the motion! Ha, we hit the button at precisely the same
moment.

Bon
 
R

Rick Brandt

Linq said:
You cannot make design changes to mde files. To change this you have
to have access to the original mdb file.

Incorrect. Nothing about an MDE affects queries or tables. The existing
query could be changed or a new one imported to replace it or exported from
another file.
 
C

ChoonBoy

Thanks, I will test this out.


Dirk Goldgar said:
I have to differ with those who have posted saying you can't do this. While
you can't change the design of forms, reports, or modules in an MDE, you can
change tables and queries. Suppose you have a database you're running this
update from, and that database has a query "qSales" that you want to replace
the like-named query in "C:/Test/database.mde". This line of code will do
it:

DoCmd.TransferDatabase acExport, _
"Microsoft Access", "C:/Test/database.mde", _
acQuery, "qSales", "qSales"


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
B

bhicks11 via AccessMonster.com

Interesting - where are you running that export from?

Bonnie

Dirk said:
How can I replace a query in another database.mde?
[quoted text clipped - 6 lines]
Click button - "qSales" is removed and new "qSales" is replaced.

I have to differ with those who have posted saying you can't do this. While
you can't change the design of forms, reports, or modules in an MDE, you can
change tables and queries. Suppose you have a database you're running this
update from, and that database has a query "qSales" that you want to replace
the like-named query in "C:/Test/database.mde". This line of code will do
it:

DoCmd.TransferDatabase acExport, _
"Microsoft Access", "C:/Test/database.mde", _
acQuery, "qSales", "qSales"
 
C

ChoonBoy

From another DB.mde.

The objective is to replace a query with an updated query.

Can anyone please help me with the close database.mde codes before the
replace query code is run.

Thanks


bhicks11 via AccessMonster.com said:
Interesting - where are you running that export from?

Bonnie

Dirk said:
How can I replace a query in another database.mde?
[quoted text clipped - 6 lines]
Click button - "qSales" is removed and new "qSales" is replaced.

I have to differ with those who have posted saying you can't do this. While
you can't change the design of forms, reports, or modules in an MDE, you can
change tables and queries. Suppose you have a database you're running this
update from, and that database has a query "qSales" that you want to replace
the like-named query in "C:/Test/database.mde". This line of code will do
it:

DoCmd.TransferDatabase acExport, _
"Microsoft Access", "C:/Test/database.mde", _
acQuery, "qSales", "qSales"
 
B

bhicks11 via AccessMonster.com

I guess that's why I'm puzzled. You can hit the tables but you can't modify
an mde.

Bonnie
http://www.dataplus-svc.com
From another DB.mde.

The objective is to replace a query with an updated query.

Can anyone please help me with the close database.mde codes before the
replace query code is run.

Thanks
Interesting - where are you running that export from?
[quoted text clipped - 16 lines]
 
D

Dirk Goldgar

bhicks11 via AccessMonster.com said:
I guess that's why I'm puzzled. You can hit the tables but you can't
modify
an mde.


Yes, you can. You can modify the design of tables and queries in an MDE.
 
B

bhicks11 via AccessMonster.com

Thanks Dirk - I'll go back to school. I thought you could get at the
database window or any design views.

Bonnie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top