=DCount Help!

vdanelia

Registered User.
Local time
Today, 14:00
Joined
Jan 29, 2011
Messages
215
Hello I need Your help:
I'm using the code :

=DCount("*","DATA","Product = """ & [Product] & """ And Brand = """ & [Brand] & """ And Model = """ & [Model] & """ AND Status Not In ('Removed')")

It works, but i want to add additional field Dateofpurchase (Date and time field).. I tried in such case:

=DCount("*","DATA","Product = """ & [Product] & """ And Brand = """ & [Brand] & """ And Model = """ & [Model] & """ And Dateofpurchase = """ & [Dateofpurchase] & """ AND Status Not In ('Removed')")

But not Working displays #Error

Please help how to add that field correctly?

In Dateofpurchase field is entered a date when product is bought property is set to (Date/Time)

Thank you in Advanced
 
Dates don't use quotes. They use Octothorpes (#):

[Model] & """ And Dateofpurchase = #" & [Dateofpurchase] & "# AND Status
 
Thank you Boblarson, Worked perfectly...
Greatest Thanks
 

Users who are viewing this thread

Back
Top Bottom