Default date format

D

Dave

I have a textbox that will be populated with an "S" and the last two
numbers of the year. How can I make this default to that?

Thanks in advance,

Dave
 
R

Ron2006

I have a textbox that will be populated with an "S" and the last two
numbers of the year. How can I make this default to that?

Thanks in advance,

Dave

"S" & Right(Format(Year(Date), "0000"), 2)

Ron
 
D

Dave

"S" & Right(Format(Year(Date), "0000"), 2)

Ron

Perfect, it worked. Thanks. How about then if I want to populate a
text box with the number of the current month? eg, 12 for December
etc.?

Dave
 
R

Ron2006

Spoke too soon. It didn't work. I get an error# in the text box.

Specifically, how are you attempting to put the value there?
Do you have any formatting set for the box?
Is the box bound to a field? Data type for that field?
What event is the trigger for loading the field?

Ron
 
D

Dave

Specifically, how are you attempting to put the value there?
Do you have any formatting set for the box?
Is the box bound to a field? Data type for that field?
What event is the trigger for loading the field?

Ron- Hide quoted text -

- Show quoted text -

I want the value to default to an S + the current year in yy format.
The box is bound to a field formatted as text (to allow imported data
that is already S07 etc). Make sense?
 
R

Rick Brandt

Dave said:
I want the value to default to an S + the current year in yy format.
The box is bound to a field formatted as text (to allow imported data
that is already S07 etc). Make sense?

Did you put an equals signs at the beginning of the default expression?
 
Top