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 VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 Search this Thread Display Modes
  #1 (permalink)  
Old September 22nd, 2006, 10:50 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Counting Dates

I have this SQL query to find the number of dates in a table between these two dates. Now I want to know how many dates there are. I tried to use count but it didnt work. Any help would be greatly appreciated.

SELECT Cans.FitDate
FROM Cans
WHERE (((Cans.FitDate)>#6/23/2005# And (Cans.FitDate)<#6/30/2005#))
WITH OWNERACCESS OPTION;

JR
Reply With Quote
  #2 (permalink)  
Old September 25th, 2006, 06:22 AM
Registered User
 
Join Date: Mar 2006
Location: Sydney, NSW, Australia.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you do it like this it won't work

SELECT Count(Cans.FitDate) as NoRecords FROM Cans
WHERE (((Cans.FitDate)>#6/23/2005# And (Cans.FitDate)<#6/30/2005#))
WITH OWNERACCESS OPTION;


Do this instead . . .

SELECT Count(*) AS NoRecords FROM Cans
WHERE (((Cans.FitDate)>#6/23/2005# And (Cans.FitDate)<#6/30/2005#))
WITH OWNERACCESS OPTION;


And
Tell me one thing what is the meaning of "WITH OWNERACCESS OPTION"??
Reply With Quote
  #3 (permalink)  
Old September 26th, 2006, 02:22 PM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the help. I dont know what WITH OWNERACCESS OPTION; does, it is just what Access puts there when I use the query design mode.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Error in Counting Jonas Access VBA 2 August 15th, 2006 12:21 AM
Counting records Jonas Access 4 August 4th, 2006 09:07 AM
counting in XSL gezi XSLT 8 March 29th, 2006 06:50 PM
record counting keyvanjan Classic ASP Databases 0 June 30th, 2005 01:20 AM
Counting ?!? hcweb Classic ASP Basics 2 December 8th, 2003 05:08 PM



All times are GMT -4. The time now is 04:20 AM.


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