Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2004, 11:48 AM
Registered User
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default could any one explain this query to me

Coulkd any one explain this query to me especiall the Where clause where we use forms what does that mean and any examples you have please let me know.
thanks
srinivas somanchi

SELECT COUNT(*)
FROM tblintstudents
WHERE (tblintstudents.Citizen IN
              (SELECT DISTINCT tblRegions.CountriesInRegion
               FROM tblRegions
               WHERE (tblRegions.GlobalRegion = [Forms]![frmRegGlobal]![txtGlobalReg] )
              )
);

 
Old April 5th, 2004, 12:58 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Hi,



1-It counts all records from table tblinstudent then
2-Selects distinct citizen records that are in table tblregions
and only
3-Records that match in table tblRegions, GlobalRegion using records that is the form frmregglobal txtglobalreg textbox.

 
Old April 5th, 2004, 08:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To clarify jemacc's post,
basically, it counts the number of students that come from a particular region

I am a loud man with a very large hat. This means I am in charge
 
Old April 6th, 2004, 08:23 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 
Quote:
quote:IN
Quote:
              (SELECT DISTINCT tblRegions.CountriesInRegion
               FROM tblRegions
               WHERE (tblRegions.GlobalRegion = [Forms]![frmRegGlobal]![txtGlobalReg] )


returns a set of values that the query uses as criteria by using the In() clause. For instance:

In(1,2,3,4,5,7,8,9)

would return any values from one to 9 not including 6.





Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone explain this code to me pandu345 Java Basics 2 October 6th, 2006 12:25 PM
could any one explain this code for me ? method Access VBA 1 August 13th, 2005 02:02 AM
explain please rein Javascript 3 January 31st, 2005 09:47 AM
Pleas explain getint() krbhatnagar C++ Programming 2 December 14th, 2004 06:10 PM
Could somebody explain this to me, please? czambran BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 June 7th, 2004 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.