I need to take the system date and break it down into a 2-digit month value and a 2-digit year value in Access 2000 and use them as the default values for new entries to a table.
I have tried to get the year value thus:
[tt]
Format(DateSerial(Year(Date()),Month(Date()),Day(Date())),"yy")
Format(Date(),"yy")
Right(DateValue(Date()), 2)
Right(Format(Date(),"mmddyy"),2)
Year(Date())
[/tt]
all resulting in "#Error" in the new record field.
Can anyone suggest something else, or spot the error in one of the above?
Cheryl dc Kern
I have tried to get the year value thus:
[tt]
Format(DateSerial(Year(Date()),Month(Date()),Day(Date())),"yy")
Format(Date(),"yy")
Right(DateValue(Date()), 2)
Right(Format(Date(),"mmddyy"),2)
Year(Date())
[/tt]
all resulting in "#Error" in the new record field.
Can anyone suggest something else, or spot the error in one of the above?
Cheryl dc Kern