ADO Connection question

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,835
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi,

I have a connection between Excel and Access. From Excel, I query Access and use the Recordset method to put the data into a sheet.

Can I use this to somehow Update or Edit an actual query that's in Access ?

Please advise yes or no. I think its No !

Thanks, ABB
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Jon,

I can't figure this, or see how it worked here once and always works for you.

If you want to investigate I've trimmed it back to bare bones-

http://dl.dropbox.com/u/49222457/test.rar

This has an mdb file with one query and an Excel module with just the code shown here previously. I've tried it on 3 different computers, using Excel 2003 and 2007 and it always fails with error 3265.

It it also fails for you, what is different to your one that works, and if it does work for you - well, I don't want to think about that !

Cheers, ABB
 
Upvote 0
Can you upload again please, but as a zip rather? :)

Are you using DAO as a fall-back?
 
Upvote 0
is it me or is the source table for the query missing? that's why the error occurs.
 
Upvote 0
Hi Again

OK you're not going crazy! I get exactly the same error. Yet if I create a new database and try it, it works fine.

Honest answer right now is 'I don't know', but I will play some more.
 
Upvote 0
It appears that if the SQL refers to an invalid table, the query becomes part of the Procedures collection, otherwise it is part of the Views.
 
Upvote 0
It appears that if the SQL refers to an invalid table, the query becomes part of the Procedures collection, otherwise it is part of the Views.


Ahhhhh, YES !! Just proved that true. Wow. My usage meant I was changing various things, using different tables etc, hence it working once.

Funny, the underlying reason for editing the query is to add a just-created table into a Union Query.

Sanity returns :)

Thank you BOTH so much !!!!!
 
Upvote 0
That's why we're here - I learned something new today too. :) That's two things already this week.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top