PC Review


Reply
Thread Tools Rate Thread

Access wont sort Correctly!

 
 
Bob
Guest
Posts: n/a
 
      13th Nov 2006


Access wont sort my query descending correctly?
It will not recognize credits in Currency eg:
$100
-$200
$300
Thanks for any help..Is there another way to sort my totals in a
Query?...............Bob







..........Jenny Vance


 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      13th Nov 2006
"Bob" <(E-Mail Removed)> wrote in message news:ejar5o$42h$(E-Mail Removed)
> Access wont sort my query descending correctly?
> It will not recognize credits in Currency eg:
> $100
> -$200
> $300
> Thanks for any help..Is there another way to sort my totals in a
> Query?...............Bob
>
>
>
> .........Jenny Vance


So is this Bob or Jenny?

I'm not aware of Access having any problem sorting Currency fields. Are
you sure the actual field type is Currency, and that you aren't being
confused by the Currency *format*? In the table design view, what does
it say is the Data Type of the field?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      13th Nov 2006
You did not say what was wrong with the sort. This is how it should sort if
you are using a datatype Number - Decimal - Currency.
Money
($200.00)
$100.00
$300.00

"Bob" wrote:

>
>
> Access wont sort my query descending correctly?
> It will not recognize credits in Currency eg:
> $100
> -$200
> $300
> Thanks for any help..Is there another way to sort my totals in a
> Query?...............Bob
>
>
>
>
>
>
>
> ..........Jenny Vance
>
>
>

 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      13th Nov 2006
"KARL DEWEY" <(E-Mail Removed)> wrote in message
news:64AA3497-D0E6-4824-8D4A-(E-Mail Removed)
> You did not say what was wrong with the sort. This is how it should
> sort if you are using a datatype Number - Decimal - Currency.
> Money
> ($200.00)
> $100.00
> $300.00


There is a bug in the sorting of Decimal fields; see this KB article:

http://support.microsoft.com/?id=837148
BUG: You may notice an incorrect sorted order
when you sort the negative decimal values in
descending order in Access

But currency values ought to be stored in the Currency data type if
possible, not Decimal.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      13th Nov 2006

"Dirk Goldgar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "KARL DEWEY" <(E-Mail Removed)> wrote in message
> news:64AA3497-D0E6-4824-8D4A-(E-Mail Removed)
>> You did not say what was wrong with the sort. This is how it should
>> sort if you are using a datatype Number - Decimal - Currency.
>> Money
>> ($200.00)
>> $100.00
>> $300.00

>
> There is a bug in the sorting of Decimal fields; see this KB article:
>
> http://support.microsoft.com/?id=837148
> BUG: You may notice an incorrect sorted order
> when you sort the negative decimal values in
> descending order in Access
>
> But currency values ought to be stored in the Currency data type if
> possible, not Decimal.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>

Dirk it seems to be a function in Query that gives me my Currency
Payable:
Format(Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidTotal,0),"Currency")
The amount left is what is owed which is what I cant seem to get sorted
Thanks...........Bob


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      13th Nov 2006

"Bob" <(E-Mail Removed)> wrote in message news:ejatvh$8pt$(E-Mail Removed)...
>
> "Dirk Goldgar" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> "KARL DEWEY" <(E-Mail Removed)> wrote in message
>> news:64AA3497-D0E6-4824-8D4A-(E-Mail Removed)
>>> You did not say what was wrong with the sort. This is how it should
>>> sort if you are using a datatype Number - Decimal - Currency.
>>> Money
>>> ($200.00)
>>> $100.00
>>> $300.00

>>
>> There is a bug in the sorting of Decimal fields; see this KB article:
>>
>> http://support.microsoft.com/?id=837148
>> BUG: You may notice an incorrect sorted order
>> when you sort the negative decimal values in
>> descending order in Access
>>
>> But currency values ought to be stored in the Currency data type if
>> possible, not Decimal.
>>
>> --
>> Dirk Goldgar, MS Access MVP
>> www.datagnostics.com
>>
>> (please reply to the newsgroup)
>>
>>

> Dirk it seems to be a function in Query that gives me my Currency
> Payable:
> Format(Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidTotal,0),"Currency")
> The amount left is what is owed which is what I cant seem to get sorted
> Thanks...........Bob
>

Oh maybe it is decimal because in my db if I have one account that is split
1/3 1/3 1/3 , and say it was $100 and one client pays $33.33 It seems to
have a carry over of 1c even though he has paid total, so then I have to
enter his payment as $33.339 to clear the cent owing.............Thanks Bob


 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      13th Nov 2006
"Bob" <(E-Mail Removed)> wrote in message news:ejatvh$8pt$(E-Mail Removed)
>>

> Dirk it seems to be a function in Query that gives me my Currency
> Payable:
>

Format(Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidT
otal,0),"Currency")
> The amount left is what is owed which is what I cant seem to get
> sorted Thanks...........Bob


If you're sorting by that calculated field, you're sorting a text field,
not a number field at all. The Format() function returns a text string.
I suggest that you do one of two things:

EITHER

(a) remove the Format() wrapping from the calculated field, so the
expression is just this:

Nz(qTotalDueForPayment.TotalDue,0) -
Nz(qPaidAmountForPayment.PaidTotal,0)

and then use the Format *property* of the text box on your form or
report to apply the Currency format,

OR

(b) leave this calculated field as it is, but don't sort on it.
Instead, add the unformatted version of the field to the query -- with
the "Show" box unchecked -- and sort on that field.

I think option (a) would be the better choice.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      13th Nov 2006
Dirk , I looked at the Table and for [Field Name]PercentAmount, was currency
but the decimal placing was [Auto] is that OK?
Thanks Bob


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      14th Nov 2006

"Dirk Goldgar" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Bob" <(E-Mail Removed)> wrote in message news:ejatvh$8pt$(E-Mail Removed)
>>>

>> Dirk it seems to be a function in Query that gives me my Currency
>> Payable:
>>

> Format(Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidT
> otal,0),"Currency")
>> The amount left is what is owed which is what I cant seem to get
>> sorted Thanks...........Bob

>
> If you're sorting by that calculated field, you're sorting a text field,
> not a number field at all. The Format() function returns a text string.
> I suggest that you do one of two things:
>
> EITHER
>
> (a) remove the Format() wrapping from the calculated field, so the
> expression is just this:
>
> Nz(qTotalDueForPayment.TotalDue,0) -
> Nz(qPaidAmountForPayment.PaidTotal,0)
>
> and then use the Format *property* of the text box on your form or
> report to apply the Currency format,
>
> OR
>
> (b) leave this calculated field as it is, but don't sort on it.
> Instead, add the unformatted version of the field to the query -- with
> the "Show" box unchecked -- and sort on that field.
>
> I think option (a) would be the better choice.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>

Now that I have taken that format away some of the totals about 80% of them
have 4 decimal points in their totals eg: this is an account fully paid but
is showing Due =$3,000.00
Paid =$3,000.00
Payable=0.0025
Is it possible for me to get my old totals back to 2 decimal placing and do
I leave this query without the $ format in Payable
Thanks for your help Bob


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      14th Nov 2006

"Bob" <(E-Mail Removed)> wrote in message news:ejb13u$eig$(E-Mail Removed)...
>
> "Dirk Goldgar" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> "Bob" <(E-Mail Removed)> wrote in message news:ejatvh$8pt$(E-Mail Removed)
>>>>
>>> Dirk it seems to be a function in Query that gives me my Currency
>>> Payable:
>>>

>> Format(Nz(qTotalDueForPayment.TotalDue,0)-Nz(qPaidAmountForPayment.PaidT
>> otal,0),"Currency")
>>> The amount left is what is owed which is what I cant seem to get
>>> sorted Thanks...........Bob

>>
>> If you're sorting by that calculated field, you're sorting a text field,
>> not a number field at all. The Format() function returns a text string.
>> I suggest that you do one of two things:
>>
>> EITHER
>>
>> (a) remove the Format() wrapping from the calculated field, so the
>> expression is just this:
>>
>> Nz(qTotalDueForPayment.TotalDue,0) -
>> Nz(qPaidAmountForPayment.PaidTotal,0)
>>
>> and then use the Format *property* of the text box on your form or
>> report to apply the Currency format,
>>
>> OR
>>
>> (b) leave this calculated field as it is, but don't sort on it.
>> Instead, add the unformatted version of the field to the query -- with
>> the "Show" box unchecked -- and sort on that field.
>>
>> I think option (a) would be the better choice.
>>
>> --
>> Dirk Goldgar, MS Access MVP
>> www.datagnostics.com
>>
>> (please reply to the newsgroup)
>>
>>

> Now that I have taken that format away some of the totals about 80% of
> them have 4 decimal points in their totals eg: this is an account fully
> paid but is showing Due =$3,000.00
> Paid =$3,000.00
> Payable=0.0025
> Is it possible for me to get my old totals back to 2 decimal placing and
> do I leave this query without the $ format in Payable
> Thanks for your help Bob

Figured out the format $#,##0.00;($#,##0.00)
Do you think its possible to get my balances back to only having last 2
digits with a double 00
Thanks bob


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 time values do not sort correctly Lynda Microsoft Access 9 5th Sep 2008 02:16 AM
Sort by name doesnt sort correctly in my opinion =?Utf-8?B?ZG91Z2xhc2dibGFrZQ==?= Windows Vista File Management 5 8th Aug 2007 03:17 PM
Access 2003 - query and table names don't sort correctly =?Utf-8?B?TGlua2tpbmdY?= Microsoft Access 1 9th Mar 2006 04:34 PM
Can Access correctly sort Library of Congress Call Numbers? =?Utf-8?B?V2lsbGlhbSBHZWU=?= Microsoft Access VBA Modules 5 27th Feb 2005 05:34 PM
XP wont set cpu correctly Jon Windows XP Hardware 0 27th Aug 2003 01:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:47 PM.