LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Problems with .Refresh BackgroundQuery:=False

OK, this would then be something like:

..... &" TO_DATE(' " & Format(Dia,"DD/MM/YYYY HH24:MI:SS") &" '
,'DD/MM/YYYY HH24:MI:SS')" & ........

This is very nasty stuff btw

I would start with using *implicit* date conversion(my pervious mail),
but that depends on the database platform and the conversion rules.
This would then eliminate the TO_DATE function.

coding a parameter inside an SQL string is *not* the most elegant way
to do this BTW. Parameter binding works much better(and no conversion
hassle). XL/MS Query can do this for you.

My advice for complex queries in XL is normally around the lines of:

Start with MS Query and make a simple query that works, but is probably
too simple to be actually useful (e.g. a simple select)
Then start adding your parameters in MS Query (like your date). to this
simple query and see if it runs. For this you need to learn a bit of MS
query, which is not the best of tools to use.

After the query runs with parameters you want to convert in into an
advanced query with this tool to edit a query directly in XL.to make it
do what you want:
http://homepages.paradise.net.nz/~ro...eryeditor.html
By now the query should look OK and run in XL.

If you still need extra stuff *then* you use VBA to manipulate the
existing Query you made.

DM Unseen

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with .Refresh BackgroundQuery:=False dmplacebo Excel Worksheet Functions 0 July 11th 05 12:39 PM
Refresh BackgroundQuery fails JMMach[_2_] Excel Programming 3 June 12th 05 03:10 PM
Error on refresh backgroundquery - help please RichardLOZ Excel Programming 7 February 6th 05 11:49 PM
Web query .Refresh BackgroundQuery:=False problem Jim[_55_] Excel Programming 1 January 26th 05 04:08 PM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM


All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"