S
Susanne
I hope this is the last post I have to do for awhile. Everyone has been so
much help.
I have 3 fields: Item #, Sequential #, and Year (they want it to by in 2
digit format). I've done this with 2 variables before, not with 3.
When Item# is selected, I need for the sequentail# to increase by one based
on the current year, again, displayed as 2 digits (07, 08, 09). When it
begins a new year, the sequential# will begin back at 0 (really 1 since the
function will add one to it).
I have this code (taking out my real field names, too long) to run on
AfterUpdate when the Item# is selected:
iNext = Nz(DMax("Select [Sequential#] where [Item#] = Me!Item#",
"[MyTable]", "[NumberYear] = Date()")) + 1
Me!Sequential# = iNext
I suspect it is something in the select clause. I didn't know if I should
use a query.
Thanks in advance!
much help.
I have 3 fields: Item #, Sequential #, and Year (they want it to by in 2
digit format). I've done this with 2 variables before, not with 3.
When Item# is selected, I need for the sequentail# to increase by one based
on the current year, again, displayed as 2 digits (07, 08, 09). When it
begins a new year, the sequential# will begin back at 0 (really 1 since the
function will add one to it).
I have this code (taking out my real field names, too long) to run on
AfterUpdate when the Item# is selected:
iNext = Nz(DMax("Select [Sequential#] where [Item#] = Me!Item#",
"[MyTable]", "[NumberYear] = Date()")) + 1
Me!Sequential# = iNext
I suspect it is something in the select clause. I didn't know if I should
use a query.
Thanks in advance!