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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to count duplicated date



 
 
Thread Tools Display Modes
  #11  
Old October 26th, 2008, 02:00 PM posted to microsoft.public.access
Rick Brandt
external usenet poster
 
Posts: 4,354
Default How to count duplicated date

Jon wrote:
Do you get a response with no WHERE clause?
MsgBox DCount("*", "[dd]")


No, I do not


This can only mean...

Your code is not being run at all.
or
You have no table or query named "dd".


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


  #12  
Old October 26th, 2008, 02:06 PM posted to microsoft.public.access
jon
external usenet poster
 
Posts: 640
Default How to count duplicated date

Thank you Douglas, I try it but still does not work!!!!! ):

"Douglas J. Steele" wrote:

picky

Remember that not everyone has his/her Short Date format set (in Regional
Settings in the Control Panel) to a format that Access will recognize. If,
for instance, the Short Date format is dd/mm/yyyy, that will fail.

Since you have no control over the user's Short Date format, you'd always
best off using

MsgBox DCount("*", "[dd]", "[ndate] = " & Format(Me.aa, "\#yyyy\-mm\-dd\#"))

/picky

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Rick Brandt" wrote in message
...

To Jon, you do not need to use Nz() around your DCount() because DCount()
never returns Null. This should work...

MsgBox DCount("*", "[dd]", "[ndate] = #" & Me.aa & "#")




  #13  
Old October 26th, 2008, 02:26 PM posted to microsoft.public.access
MikeJohnB
external usenet poster
 
Posts: 464
Default How to count duplicated date

Just a thought, are you using Access 2007?

Is your database set up as a trusted site?
Did you click options, allow this content when the database opened?
If not, the code will not run.

These other guys are more switched on than me, so just trying to clarify
things.
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


"Rick Brandt" wrote:

Jon wrote:
Do you get a response with no WHERE clause?
MsgBox DCount("*", "[dd]")


No, I do not


This can only mean...

Your code is not being run at all.
or
You have no table or query named "dd".


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



  #14  
Old October 26th, 2008, 02:39 PM posted to microsoft.public.access
Rick Brandt
external usenet poster
 
Posts: 4,354
Default How to count duplicated date

MikeJohnB wrote:
Just a thought, are you using Access 2007?

Is your database set up as a trusted site?
Did you click options, allow this content when the database opened?
If not, the code will not run.


Excellent point.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 




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 07:32 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.