M
Michael
Rick Brandt was kind enough to give me the following code. I was unable to
follow up at the time and I did not repost there as I think the thread is
dead now.
I have tried many variations on the code and cannot get it to work. I am
trying to reset the delivery number to 1 each morning and then to increment
as each order is added.
This is the code he provided and below is my last attempt to get it to work
and a definition of the field names that I am using.
When I try to add the code, I get the following error.
"The expression you entered contains invalid syntax. You omitted an operand
or operator, you entered an invalid character or comma, or you entered text
without surrounding it in quotation marks."
=Nz(DMax("DailyDeliveryID","tblDailyDelivery","Day(CreatedDate) =
Day(Date)"), 0) + 1
I have altered it to the following and not sure if I have done it correctly
=Nz(DMax("NPedana","Registro Entrata", "Day(Del) = Day(Date)"), 0) + 1
NPedana is the deliveryID
Registro Entrata is the name of the table where the ID is stored
Del is the date of the deliver that is in the table (created by using a
default of Date() in the properties box.(I was not sure if CreatedDate was a
function.
thank you
Michael
follow up at the time and I did not repost there as I think the thread is
dead now.
I have tried many variations on the code and cannot get it to work. I am
trying to reset the delivery number to 1 each morning and then to increment
as each order is added.
This is the code he provided and below is my last attempt to get it to work
and a definition of the field names that I am using.
When I try to add the code, I get the following error.
"The expression you entered contains invalid syntax. You omitted an operand
or operator, you entered an invalid character or comma, or you entered text
without surrounding it in quotation marks."
=Nz(DMax("DailyDeliveryID","tblDailyDelivery","Day(CreatedDate) =
Day(Date)"), 0) + 1
I have altered it to the following and not sure if I have done it correctly
=Nz(DMax("NPedana","Registro Entrata", "Day(Del) = Day(Date)"), 0) + 1
NPedana is the deliveryID
Registro Entrata is the name of the table where the ID is stored
Del is the date of the deliver that is in the table (created by using a
default of Date() in the properties box.(I was not sure if CreatedDate was a
function.
thank you
Michael