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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Results Where Qty Shipped is not Divisable by 4



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2010, 04:22 PM posted to microsoft.public.access.queries
meangene
external usenet poster
 
Posts: 29
Default Query Results Where Qty Shipped is not Divisable by 4

How would I construct a query to return all invoices where the qty shipped
for a specific item is not divisable by 4? Really its the divisable by 4 part
need assistance with. Thanks!
  #2  
Old February 19th, 2010, 04:28 PM posted to microsoft.public.access.queries
Ken Snell
external usenet poster
 
Posts: 177
Default Query Results Where Qty Shipped is not Divisable by 4

SELECT *
FROM YourTableName
WHERE YourFieldName Mod 4 0;

--

Ken Snell
http://www.accessmvp.com/KDSnell/


"meangene" wrote in message
...
How would I construct a query to return all invoices where the qty shipped
for a specific item is not divisable by 4? Really its the divisable by 4
part
need assistance with. Thanks!



  #3  
Old February 19th, 2010, 04:30 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Query Results Where Qty Shipped is not Divisable by 4

Interesting question! Put something like this in the field of the query with
the correct field name in place of ID:

Not4: [ID]/4

In the criteria put the following again with the proper field name:

Int([ID]/4)
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"meangene" wrote:

How would I construct a query to return all invoices where the qty shipped
for a specific item is not divisable by 4? Really its the divisable by 4 part
need assistance with. Thanks!

  #4  
Old February 19th, 2010, 06:03 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Query Results Where Qty Shipped is not Divisable by 4

Much nicer than my solution.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Ken Snell" wrote:

SELECT *
FROM YourTableName
WHERE YourFieldName Mod 4 0;

--

Ken Snell
http://www.accessmvp.com/KDSnell/


"meangene" wrote in message
...
How would I construct a query to return all invoices where the qty shipped
for a specific item is not divisable by 4? Really its the divisable by 4
part
need assistance with. Thanks!



.

  #5  
Old February 19th, 2010, 06:43 PM posted to microsoft.public.access.queries
meangene
external usenet poster
 
Posts: 29
Default Query Results Where Qty Shipped is not Divisable by 4

Jerry and Ken - Thank you both for the response!

"Jerry Whittle" wrote:

Much nicer than my solution.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Ken Snell" wrote:

SELECT *
FROM YourTableName
WHERE YourFieldName Mod 4 0;

--

Ken Snell
http://www.accessmvp.com/KDSnell/


"meangene" wrote in message
...
How would I construct a query to return all invoices where the qty shipped
for a specific item is not divisable by 4? Really its the divisable by 4
part
need assistance with. Thanks!



.

 




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


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


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