Senin, 01 Februari 2016

Re: [MS_AccessPros] Convert Memo to Number in Query or Report

 

Dale-


Add an expression to a query on the table something like:

SortField: CLng(Left([Field_Value]), 10)

.. then sort on that.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Feb 1, 2016, at 3:20 PM, tenn_tazz26@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I am using MS Access 2007 and have a few tables linked to an SQL database. I have read only access to the database so I cannot change how it stores the data. There is a table that has a field ([Field_Value]) which is being stored as Memo field instead of a number. I am trying to create a query that will sort desecending (Largest number to lowest) by this Field_Value but because it is a memo field when it gets to the numbers 10, 11, 12, etc it is not sorting those correctly because it is not treating them as true numbers. It should be in the order of 12, 11, 10, 9, 8 etc but it is doing it more like 9,8,7,6,5,4,3,2,1, 10, 11, 12 etc. How do I make the query or a report treat this field value as a number instead of memo. When I go to properties in the query it is blank for Format and I thought maybe that is where I can set it but things I have tried did not work.  Any ideas?


Thanks,

Dale


__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Poskan Komentar