Formatting Dcount

  • Thread starter Thread starter hotplate
  • Start date Start date
H

hotplate

On an after update I am using:

[NCMT] = (Format(Date, "ddmmyy") & DCount("*", "[tblNCMT_Log]",
"[NCMT_Date] = #" & Date & "#"))

How do I get format the result so it is "05010901" instead of
"0501091"?

Also, how do I get it to start counting at from 1 not 0 so my first
record for the day wont be "05010900".

Thanks,

Garrett
 
DCount("*", "[tblNCMT_Log]","[NCMT_Date] = #" & Date & "#")


Simply wrap the above in a format command:

format(above,"00")
Also, how do I get it to start counting at from 1 not 0 so my first
record for the day wont be "05010900".

Just add + 1 BEFORE your format:

eg:

format(above + 1,"00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Dcount (multiple criteria) 3
Still struggling with DCount 8
Dcount Problem 2
DCount problem redux 4
Dcount returning no results!!! 0
Access MS Access DCount function problem 0
Conditional Formatting and DCount (?) 2
DCount 5

Back
Top