Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Using DoCmd.Ope...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 15 Topic 30439 of 31576
Post > Topic >>

Using DoCmd.OpenQuery on a query in a remote database

by teddysnips@[EMAIL PROTECTED] Jun 3, 2008 at 05:15 AM

My clients have asked me to maintain a database that was developed in-
house.  It's pretty good, considering the developer isn't a
"programmer".

The first thing they want me to do is to split it into a Front End/
Back End, which is very sensible.  However, there are a number of ad
hoc queries that are required to be available to all users, which can
be edited, deleted or created "on the fly".  The most sensible
solution would seem to be to store these in the Back End database, and
to get access to them thus:

Dim dbNew As DAO.Database
Dim qdfExisting As DAO.QueryDef

=91 Open the back end database
Set dbNew =3D DAO.Workspaces(0).OpenDatabase("C:\Projects\MyProject
\TestBackEnd.mdb")

=91 Open the query on the back end database
Set qdfExisting =3D dbNew.QueryDefs("qryGetCustomer")


In the existing code there is a function to edit these ad hoc queries
using the DoCmd.OpenQuery function.

DoCmd.OpenQuery "qryGetCustomer", acViewDesign

This works fine in the unsplit version.  However, I can't seem to work
out how to pass a query on the remote database into this function.
Not unsurprisingly this doesn't work:

DoCmd.OpenQuery dbNew.QueryDefs("qryGetCustomer"), acViewDesign

Has anyone any ideas on how to solve this?

Thanks

Edward
 




 15 Posts in Topic:
Using DoCmd.OpenQuery on a query in a remote database
teddysnips@[EMAIL PROTECT  2008-06-03 05:15:25 
Re: Using DoCmd.OpenQuery on a query in a remote database
rkc <rkc@[EMAIL PROTEC  2008-06-03 08:56:22 
Re: Using DoCmd.OpenQuery on a query in a remote database
"paii, Ron" <  2008-06-03 08:49:37 
Re: Using DoCmd.OpenQuery on a query in a remote database
teddysnips@[EMAIL PROTECT  2008-06-03 06:17:00 
Re: Using DoCmd.OpenQuery on a query in a remote database
"Larry Linson"   2008-06-03 14:17:07 
Re: Using DoCmd.OpenQuery on a query in a remote database
teddysnips@[EMAIL PROTECT  2008-06-03 07:18:22 
Re: Using DoCmd.OpenQuery on a query in a remote database
rkc <rkc@[EMAIL PROTEC  2008-06-03 10:45:49 
Re: Using DoCmd.OpenQuery on a query in a remote database
"paii, Ron" <  2008-06-03 12:51:54 
Re: Using DoCmd.OpenQuery on a query in a remote database
teddysnips@[EMAIL PROTECT  2008-06-03 07:57:45 
Re: Using DoCmd.OpenQuery on a query in a remote database
"Stuart McCall"  2008-06-03 16:49:33 
Re: Using DoCmd.OpenQuery on a query in a remote database
"Larry Daugherty&quo  2008-06-03 15:02:14 
Re: Using DoCmd.OpenQuery on a query in a remote database
lyle fairfield <lyle.f  2008-06-03 16:14:13 
Re: Using DoCmd.OpenQuery on a query in a remote database
teddysnips@[EMAIL PROTECT  2008-06-04 00:55:09 
Re: Using DoCmd.OpenQuery on a query in a remote database
lyle fairfield <lyle.f  2008-06-04 03:55:51 
Re: Using DoCmd.OpenQuery on a query in a remote database
teddysnips@[EMAIL PROTECT  2008-06-04 04:22:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:05:43 CST 2008.