xollef
Technical User
- Apr 23, 2002
- 30
Hello
I want to create an incrementing number in this format
YY_001
YY_002
Where YY is the year, thereby order 28 this year looks like this 04_028
I lookup the value with a dmax function:
And i get this to work
But this wont work, it gives the error null value:
Why doesnt it find any records the second dmax function?
I want to create an incrementing number in this format
YY_001
YY_002
Where YY is the year, thereby order 28 this year looks like this 04_028
I lookup the value with a dmax function:
And i get this to work
Code:
workid = DMax("[work_id]", "orders", "[work_id] Like '04_???'")
But this wont work, it gives the error null value:
Code:
Dim workid, search_criteria, year_abbreviation As String
Dim year As Date
year = Date
year_abbreviation = Right(year, 2)
search_criteria = year_abbreviation & "_???"
workid = DMax("[work_id]", "orders", "[work_id] Like '&search_criteria&'")
Why doesnt it find any records the second dmax function?