Default date format

  • Thread starter Thread starter Dave
  • Start date Start date
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
 
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
 
"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
 
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
 
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?
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top