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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|