Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 5th, 2004, 12:48 PM
Registered User
 
Join Date: Apr 2004
Location: , , .
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] )
              )
);

Reply With Quote
  #2 (permalink)  
Old April 5th, 2004, 01:58 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
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.

Reply With Quote
  #3 (permalink)  
Old April 5th, 2004, 09:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
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
Reply With Quote
  #4 (permalink)  
Old April 6th, 2004, 09:23 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
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
Reply With Quote
Reply


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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone explain this code to me pandu345 Java Basics 2 October 6th, 2006 01:25 PM
could any one explain this code for me ? method Access VBA 1 August 13th, 2005 03: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 05:05 PM



All times are GMT -4. The time now is 03:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.