I am attempting to populate a field based on the julian day the record is created.
I need the field (ordernum) to display as follows JulianDate-000 (133-100). Where the first three digits are the Julian day and the three after the dash will increment by one when a new record is made.
I am using the following code to generate the julian date:
Function CDate2Julian(MyDate As Date) As String
CDate2Julian = Format(MyDate - DateSerial(Year(MyDate) - 1, 12, _
31), "000")
End Function
which is producing the correct julian date but I am unable to produce the dash or the numbers afterwards (which I need to increment by one with each new record) Am I asking to much or am I not doing this the correct way? any help would be great.