+ Reply to Thread
Results 1 to 5 of 5

Returning results of query in custom data types

  1. #1
    Registered User
    Join Date
    02-15-2018
    Location
    England
    MS-Off Ver
    365
    Posts
    34

    Returning results of query in custom data types

    Hi all,

    I am using below query to get data from Access and paste it into Excel worksheet. When data is transferred back to Excel it does not have correct date data types. For all cells in the column I need to double click and confirm and it changes to date format. I tried to use loop macro that would do this with every cell, but it takes around 8 minutes for 2,500 rows which is too long. Is there any other way to return certain columns with date format?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Returning results of query in custom data types

    Maybe you can use this code afterwards for column H.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    02-15-2018
    Location
    England
    MS-Off Ver
    365
    Posts
    34

    Re: Returning results of query in custom data types

    @oeldere thanks for your reply, but unfortunately this does not change the value inside each cell to data format..

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Returning results of query in custom data types

    Ok, what is the result of the offered code?

  5. #5
    Registered User
    Join Date
    02-15-2018
    Location
    England
    MS-Off Ver
    365
    Posts
    34

    Re: Returning results of query in custom data types

    The code itself executes without an error, however none of the cells are changing format. It is exactly same behaviour I get when trying to achieve this with manual intervention. Since trying your solution I have checked result I will get by using power query for ms access connection and changing data type there. This seems to be doing the trick however I am still in process of testing whether this is the best solution performance wise. I will post an update when I am done

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA SQL Query not returning All Results
    By ocnuybear in forum Access Tables & Databases
    Replies: 7
    Last Post: 09-23-2021, 12:09 PM
  2. [SOLVED] Query returning no results when data is there (Problem is at c = ...)
    By cbogner in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 07-05-2017, 04:31 PM
  3. Microsoft Query Returning Blank Cells/Results
    By skull132 in forum Excel General
    Replies: 2
    Last Post: 07-11-2014, 04:26 AM
  4. [SOLVED] Access unmatched query returning Blank Results
    By jonboy6257 in forum Access Tables & Databases
    Replies: 4
    Last Post: 12-04-2013, 10:46 AM
  5. Beginner to User Defined Data Types (Custom Type, UDTs)
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 11-24-2013, 06:21 PM
  6. SQL Query not returning correct results
    By Stephen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2006, 08:25 AM
  7. [SOLVED] 2 data types (same col/dif times), do: custom? parse? 2col?
    By nastech in forum Excel General
    Replies: 1
    Last Post: 06-16-2006, 01:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1