Using MS Access/Dcount

Advertisement


Question
I have a table "tblHolidays" with a date field for public holidays "holidate". I am using Dcount to calculate public holidays between two dates as such:
Dcount("holidate","tblHolidays", "holidate <=[To] AND holidate >= [From]". It is returning zero. What's wrong with it?
Note: I was working on local tables and using different function which was working perfectly. I then put the tables on an SQL server and couldn't use the previous function anymore because of dates format problem.

Regards
Elie

Answer
Hello Elie,

Date data types in SQL-Server are a little different then what you have in MS-Access. Please make sure your using the correct date data type for both your fields.

Please checkout this link: http://blogs.msdn.com/b/ssma/archive/2011/03/06/access-to-sql-server-migration-u

Best regards
Manish

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Manish Batola

Expertise

ALL MICROSOFT ACCESS DESIGN AND Development QUESTIONS which occur in a Access Projects Lifecycle. Can offer constructive help on Designing Advanced MS-ACCESS Applications such CRM/FRM(Follow-up),HSE-Health,Safety & Environmental Applications,School Management Systems,Hotel Software, Hospital Software,Chemicals Indenting,Import/Export,MRP - Manufacturing Resource Planning, ERP - Enterprise Resource Planning, Automotive Management Systems, Business Intelligence for Oil & Gas Drilling Operations, CRM,KPI- Key Performance Indicators,HealthCare, Hospitality, Constructions, Loyalty Clubs, Call Centers, Travel & Tourism, Educational Institutions, Industrial Strength Invoicing and many more being added every year.

Experience

29+ yrs in the Software industry with 23yrs completely dedicated on more than 350 Various Microsoft Access Projects from different Industry Sector[s]. I'm using Access ever since it was born.

Organizations
Worked in various multinationals catering from Aerospace, Oil & Gas etc.

Education/Credentials
-BSc - Computer Science -MSAP (Master in Software & Applications Programming) -BPRE (Business Process Re-engineering Engineer) -SQAE (Software Quality Assurance Engineer) -STIE (Software Testing & Inspection Engineer) -Project Engineer (Software Development)

Past/Present Clients
Catered to various clients in the following industries • Oil & Natural Gas (BPM/CRM/Access Development) • Sales / Marketing (CRM) • Automotive (Automobile Dealers) • Logistics & Indenters (Import/Export) • HealthCare / Hospitals • Hotels 3* & 5* • Restaurants • Construction Co’s (Project Billing) • Clubs (Concept Selling) • Shoe-Chains • Solicitors/Lawyers • Call Centers • Aerospace (Preventive Maintenance) • Travel & Tourism • Computer Vendors • Manufacturing • Music Shops • Education • Data Warehousing • Health,Safety & Environmental Applications • Mud Engineering • School Management Software

©2016 About.com. All rights reserved.