A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DCount Issue



 
 
Thread Tools Display Modes
  #1  
Old February 10th, 2006, 05:25 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default DCount Issue

I have inherited an Access DB and I have been trying to clean up extra
Qureies and replace with DCount.

I have been fairly successful but.......

I want to comine 2 that I am using and make them the inverse . One is
looking to Count Warrany repairs =DCount("[DATE
SHIPPED]","qryQualityListRepairsShippedbyDate","[WARRANTY] = 'Y'") - Seems to
work fine

The other counts a text field Called [Reason for Return] and I am counting
if the Field Starts with "DOA" or starts with "D.O.A." =DCount("[DATE
SHIPPED]","qryQualityListRepairsShippedbyDate","[REASON FOR RETURN] Like
'DOA*' OR [REASON FOR RETURN] like 'D.O.A.*'") Seems to work fine

Now I am Trying to Count Standard Repairs which would be Warranties NOT = to
"Y" or (NOT Like Starting with DOA* or Not Like Starting with D.O.A*). I
think the OR, AND - either I am getting an Error (Syntac) or the wrong
figure (Logic).

Any suggestions - Thanks

Joe
--
Thanks for any assistance
  #2  
Old February 10th, 2006, 06:06 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default DCount Issue

This is something that confuses people all the time. If you want to count a
field looking for two values you use OR

If x = "3" Or x = "9"

Will return only rows where x is "3" or "9"

If you are looking to omit "3" and "9", you would use And

If x "3" And x "9"

Will return all rows except where x is "3" or "9"

If you were to say

If x "3" Or x "9"

Will return all rows

So, to your specific problem:
=DCount("[DATE SHIPPED]","qryQualityListRepairsShippedbyDate", _
"[REASON FOR RETURN] Not Like 'DOA*' And [REASON FOR RETURN] _
Not like 'D.O.A.*' And "[WARRANTY] 'Y'")

"NNlogistics" wrote:

I have inherited an Access DB and I have been trying to clean up extra
Qureies and replace with DCount.

I have been fairly successful but.......

I want to comine 2 that I am using and make them the inverse . One is
looking to Count Warrany repairs =DCount("[DATE
SHIPPED]","qryQualityListRepairsShippedbyDate","[WARRANTY] = 'Y'") - Seems to
work fine

The other counts a text field Called [Reason for Return] and I am counting
if the Field Starts with "DOA" or starts with "D.O.A." =DCount("[DATE
SHIPPED]","qryQualityListRepairsShippedbyDate","[REASON FOR RETURN] Like
'DOA*' OR [REASON FOR RETURN] like 'D.O.A.*'") Seems to work fine

Now I am Trying to Count Standard Repairs which would be Warranties NOT = to
"Y" or (NOT Like Starting with DOA* or Not Like Starting with D.O.A*). I
think the OR, AND - either I am getting an Error (Syntac) or the wrong
figure (Logic).

Any suggestions - Thanks

Joe
--
Thanks for any assistance

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font list box issue Jeffrey Millar Powerpoint 9 February 4th, 2006 05:34 PM
Wrap Text issue jsAlpha General Discussion 2 January 5th, 2006 01:56 PM
Office 2003 on Win XP -hour glass issue -HELP! jonpdavies Setup, Installing & Configuration 0 December 11th, 2005 08:33 AM
Outlook 2000 Calendar Display Issue sampath Calendar 3 November 24th, 2005 12:56 PM
DCOUNT or not DCOUNT, that is the question Roger Carlson Running & Setting Up Queries 0 July 14th, 2004 04:10 PM


All times are GMT +1. The time now is 12:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.