473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Counting only the null in a Date Field

1
I only want to count the records that have no dates in a field I tried this :
Expand|Select|Wrap|Line Numbers
  1. txt114 = DCount("*", "tDHS", "IsNull([Date hit was completed])")
but it counts all records weather they are null or not.
Feb 1 '13 #1
4 2415
NeoPa
32,556 Expert Mod 16PB
Please check out these links before posting any new questions :
How to ask "good" questions -- READ BEFORE SUBMITTING A QUESTION!.
Before Posting (VBA or SQL) Code.

This appears to be a single line of VBA code. If that is the case then you may want to try :
Expand|Select|Wrap|Line Numbers
  1. txt114 = DCount("*", "tDHS", "([Date hit was completed] Is Null)")
Feb 1 '13 #2
zmbd
5,501 Expert Mod 4TB
also, select dcount() in the vba editor and press [F1] as your syntax was quite off.
Feb 2 '13 #3
NeoPa
32,556 Expert Mod 16PB
Did I miss something Z? The syntax looked ok to me (confused).
Feb 3 '13 #4
zmbd
5,501 Expert Mod 4TB
Honestly, thought I saw something weird there...
Maybe it was the ISNULL() function being used instead of the more SQL like format as offered in #2 that threw me.
Feb 4 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ricky | last post by:
I have a table with a field type date and null is set to yes. How can I insert a blank value without it being save as 0000-00-00. thanks Ricky
1
by: Gee | last post by:
Hi Folks, I have a small database that contains test dates. We can only sit 9 people per test. I need to count the dates that are the same and NOT go over 9. I read MSAcess help on the DCount...
6
by: Dean Slindee | last post by:
I am looking for the "right" way to handle inserting and presenting null date values. Public Const c_NullDate As Date = #12:00:00 AM# If I set the value of a date variable in an SQL Server insert...
10
by: satishrajana | last post by:
Hi, My SQL returns a NULL in a datefield if there is no date in that field. If there is a NULL in this column, I want to replace it with spaces in my SELECT statement when I am selecting these...
3
by: Finn Stampe Mikkelsen | last post by:
Hi I have defined a table in my database, with 2 date-fields. I have set a default value to DBNull. I have integrated a nullable datetimepicker control to my project and set the apropriate...
1
by: klove1209 | last post by:
Good afternoon, I am currently working on this unbounded form that has numerous date fields. I wanted to know if it is possible to save data in a form, with a null date field. I am currently...
10
by: Jes | last post by:
Dear all I have a date field on a HTML form where the user is asked to key in dd/mm/yyyy However, when that is written to MySql it is either not accepted or another value is tored in the...
6
by: ndeeley | last post by:
Hi, How do I insert a null or blank field into a database using coldfusion? I'm new to CF and its proviing a bit tricky! My database date field accepts null values (I think - theres no default...
0
by: sai krishna | last post by:
Hi All, Here is the issue java object has date fields that are null, I need to marshal an xml using jaxb, but jaxb doesn't allow null values when it marshal's. Is there any way to tell jaxb that...
11
by: DAHMB | last post by:
How do I format the following to work properly? Private Sub btnFilterOutstanding_Click() Dim stFilter As String If "#Tables!! ISNull#" Then stFilter = "Tables!"
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.