views:

60

answers:

1

AdoTable1.Filter:= 'Date = #'+FormatDateTime('dd/mm/yyyy', Tomorrow)+ ' #' ;

Why is Date surrounded with number signs?? Is this Access -specific??

thanks in advance!

+3  A: 

DrStrangeLove, the # sign (hash-marks) is the delimiter for a date field in access, you can check this paper for more info about delimiters in Access.

Access Basics for Programming: Delimiters

RRUZ
And to answer the other half of the question: Yes, it's Access-specific.
Ken White
No, it's NOT Access-specific. It's Jet/ACE-specific. Jet/ACE exists outside of Access, and Access can utilize other datastores and use other date delimiters (depending on context and how you're using your SQL and how you're accessing the data).
David-W-Fenton
@David-W-Fenton you are right, but the default database engine for access is Jet/ACE and this engine uses the `#` hash marker as delimiter.
RRUZ
Your last statement is correct. The original one was not.
David-W-Fenton