venu_resoju
Registered User.
- Local time
- Today, 16:40
- Joined
- Dec 29, 2010
- Messages
- 130
Hai Friends..
I am trying to count a "Sex" field in a query named "PayrollQuery" by using DCount function, but it is not working and saying syntax error. the code is mentioned below..
in the above code...
please anybody help me to correct my code..
thanks in advance.
I am trying to count a "Sex" field in a query named "PayrollQuery" by using DCount function, but it is not working and saying syntax error. the code is mentioned below..
Code:
=DCount("sex", "PayrollQuery", "Sex='Male'" AND' Payperiod between #" & ([Forms]![LCR]![cbomonth] & "-" & [Forms]![LCR]![cboyear]) & "# AND #" & ([Forms]![lcr]![txtdate2]) & "#")
in the above code...
([Forms]![LCR]![cbomonth] & "-" & [Forms]![LCR]![cboyear]) is start date and here cbomonth and cboyear are not date fields.
[Forms]![LCR]![cboyear] is end date and it is a date filed.
please anybody help me to correct my code..
thanks in advance.