Solved

ODBC Query to Access Database Won't Filter Correctly

Posted on 2013-06-04
4
782 Views
Last Modified: 2013-06-11
I created an ODBC query into my Access Database. I am using Excel 2003. When i create a query, I have multiple columns. I am trying to filter those columns through Excel to see the data I am looking for. Lets say in Column A are dates. And lets say I have 100 rows of data. Lets say i want to filter those dates Ascending. Also, not all rows have dates. That should be a problem. So, when I sort Column A Ascending, it sorts only 10 rows, then there are 50+ blank cells without dates, but then, there are more dates that didn't filter with the other dates at the top. Why wouldn't all the dates filter together? Why is there a gap in the dates? This data is upated constantly and more rows are being generated daily. So i need this filter to keep in Ascending order and catch the new data being queried. Any thoughts/suggestions??? Thanks!!!!!
0
Comment
Question by:brasiman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 24

Assisted Solution

by:Steve
Steve earned 200 total points
ID: 39221242
You could sort the data in the SQL using an ORDER BY clause

How have you aquired the data, using MS Query?
If you use Data > From other Sources > MS Query it can be easier to handle the data.
In 2007+ it automatically puts the data into a table which makes life easier, I cannot remember if it does similar for 2003... but it should define the whole area for filtering.

ATB
Steve.
0
 
LVL 16

Accepted Solution

by:
Jerry Paladino earned 300 total points
ID: 39221697
Check the format of the dates that are being returned to Excel from your query.   It is possible that Excel is interpreting some of them as actual dates and others as text strings.  In other words, Excel cannot resolve the date format on some of the records being returned.  

As a test, format the date column as numbers instead of dates.   The ones that are being interpreted as actual dates should be in the 41,400 range of number (01-Jun-2013 = 41,426).   Any date strings that Excel cannot resolve will remain as text strings and not display as numbers.   If this is the case, you will need to restrict how dates are entered into the Access database so a valid date format it used.
0
 

Author Comment

by:brasiman
ID: 39222869
I am running Excel 2003. So I go to Data, Import External Data, New Database Query. The query does not automatically put the data into a table. That is what i think the problem is. How do i get it so the data is automatically put in a table?

I will look at the date formats now.

Any thoughts on how to get the data in a table automatically?
0
 
LVL 16

Expert Comment

by:Jerry Paladino
ID: 39222965
Tables were introduced in Excel 2007.  Excel 2003 (and earlier) has Excel Lists which do not have all the same functionality of the Excel Tables that are in 2007/2010/2013.   The output from the Excel query is creating an Excel list in 2003.   The dates will function the same in an Excel List and in an Excel Table.   No difference.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Outlook 2016 VB code syntax 4 33
Cannot locate cell 15 40
Excel Auto-Complete lines 4 32
Vlookup (Microsoft Excel Programming) 5 25
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question