>Tim & John,
>
>Thank you both for your idea's, though neither will work, here's how:
>
>John:
>Year(Date()), <this returns 26/06/1905>
Only if you format it as a Date/Time, or store it in a DateTime field.
The Year() function returns an integer; and 2005 days after 12/30/1899
(the base of the date/time numbering system) is in fact June 26, 1905.
>Private Sub Form_BeforeInsert(Cancel as Integer)
>Me!BookingSeq = NZ(DMax("[BookingNo]", "[tblBookings]", "[BookingYear] = " &
>Year(Date()))) + 1
> End Sub, <this does nothing(that I can see!)>
It sets the value of the Control named BookingSeq on your Form to that
value, if your form and your table are set up correctly. Sorry, I was
giving an example, not a detailed cookbook approach; if you'ld like
the latter, please post back.
>Tim:
> = Format(YearNumber,"0000") & "/" & Format(SerialNumber,"000")
>The only return I get from this is <#Name?>,
>
>This must be slightly more difficult than first thought, I will scrap idea.
Only very slightly. I think if you use an Integer field rather than a
Date field for the BookingYear you'll be fine.
John W. Vinson[MVP]