general odbc error 1004 excel 2007 West Millgrove Ohio

Address Sylvania, OH 43560
Phone (419) 517-3472
Website Link
Hours

general odbc error 1004 excel 2007 West Millgrove, Ohio

All rights reserved. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 More About Us... Pls let me know if you nee more info. Home Questions Office Help Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts Ask a Question Excel Microsoft Word PowerPoint Advanced Search Forum Office & Productivity

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed If the DisplayAlerts property is False, dialog boxes aren't displayed and the Refresh method fails with the Insufficient Connection Information exception. The program works fine on my computer, but when my user tries to run > it on his computer, (same versoion of Excel, 2000), he gets the following > error. > Monday, June 13, 2016 1:37 PM Reply | Quote 0 Sign in to vote I just had this problem and found I needed tospecifiy .CommandType = xlCmdSql before I specified the

In my case I have created a macro that works in Excel 2010 and does not work in Excel 2007. arrays: A string is just text encased in quotes, "hello there". If the query isn't valid, the Refresh method fails with the SQL Syntax Error exception. Joel said: Recorded macro aren't very robust.

It seems to be a conversion issue between what it takes successfully in the CommandText line and what MS Query shows and uses. Any help would be appreciated. This code previously worked and suddenly it will not refresh the back ground query anymore: Sub LoadFromDb(sDb As String, sSql As String, sTab As String, sPath As String, sRange As String) I am stumped.

I have a little macro that queries an ACCESS file and returns desired values. Apart from that are you sure you are wanting to refer to the ActiveWorkbook rather than ThisWorkbook? –Gareth Feb 3 '15 at 11:02 @Gareth removed On Error Resume Next I can never run the macro from my computer. If the DisplayAlerts property is False, dialog boxes aren't displayed and the Refresh method fails with the Insufficient Connection Information exception.

Sometimes, with one of these processes in particular I get the "Get Run-time error '1004' General ODBC Error" when the code gets to the line ".Refresh BackgroundQuery:=False" in my ConnectDB sub. Register To Reply + Reply to Thread « Previous Thread | Next Thread » Thread Information Users Browsing this Thread There are currently 1 users browsing this thread. (0 members and This is the error we have got: Run-Time Error 1004, General ODBC error. Just click the sign up button to choose a username and then you can ask your own questions on the forum.

share|improve this answer answered Apr 23 '13 at 1:44 lance 26115 add a comment| up vote 0 down vote Change your property .Refresh BackgroundQuery:=False to be .Refresh. Nothing has changed from 2007 to 2010 in regards to this so if changing the property does not fix the issue there is something else going on such as part of Excel - Tips and Solutions for Excel Privacy Statement Terms of Service Top All times are GMT -4. Do you need a defined name (range) in your new spreadhseet called "Query from ora_psp2"? "SKS >" < wrote in message news:com... - -- Trevor Reply With Quote 06-23, 06:54 PM

The program works fine on my computer, but when my user > >> > > tries to run > >> > > it on his computer, (same versoion of Excel, 2000), go to VBA menu Tools - Options - General - Error >> Trapping. >> >> "CLR" wrote: >>> On Friday, November 07, 2008 10:36 AM CL wrote: >>> Hi Joel........ >>> Sign up now! After Microsoft Excel makes a successful connection, it stores the completed connection string so that prompts won't be displayed for subsequent calls to the Refresh method during the same editing session.

Privacy statement Help us improve MSDN. Help Register Log in Remember Me? If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.Would you like to participate? Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.

When I step through the code, it fails at the Refresh line and throws a run time error '1004' - General ODBC error (very descriptive, I know). Excel gets the data via FileDSN which I updated but the still I get the “ 1004 run error” General ODBC error “ and VB editor points at the row: The default is some type of table layout which is only good for bringing back the entire table. How?

All rights reserved. Not sure why. Here is the code: Please Login or Register to view this content. First >>>> try on the working computer to eliminate as many unecessary items as possible >>>> and check to make sure it still works.

I almost have this working but I'm getting stuck on this error every time I execute it. Why does this execution plan have Compute Scalars? I would > remove some unecessary line in the command until you get it to work. > First > try on the working computer to eliminate as many unecessary items as Here's the code: Private Sub CommandButton1_Click() Dim smpldatea As Date Dim smpldateb As Date Dim fdate1 As String Dim fdate2 As String smpldatea = UserForm1.TextBox1.Text smpldateb = UserForm1.TextBox2.Text fdate1 = Format(smpldatea,