Autofill in Access

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

nightarrow85

Thread Starter
Joined
Nov 28, 2011
Messages
3
Hello,

I need to update a shipping memo form to contain a field for Memo No. This field needs to be YY-000 where 000 is an entered number and YY is the current year (12 as of january). The field is already setup to take in user input, but is set with a static number as YY. How can I change the static number to auto-update with the year?

Im brand new to Access.

Thanks!
nightarrow85
 

nightarrow85

Thread Starter
Joined
Nov 28, 2011
Messages
3
I tried entering (date(), "yy")-000 into the format box, however the field is displaying ############.... and Access changes where the quotation marks are within the format box.

What am I missing? :confused:
 
Joined
Jun 20, 2011
Messages
82
The expression I gave you doesnt go in the Format property of the text box. I guess I assumed you were inputing the static number during the On Load event or something. Is it part of the Input Mask?
 

nightarrow85

Thread Starter
Joined
Nov 28, 2011
Messages
3
What I am specifically trying to do is click on the field I'm trying to change, then go to Property sheet. In the format box I currently have "11-"000 . The 11- part needs to be an autofill for the year so that this form doesnt need to be updated every year.

I've tried "yy-"000 but the year comes out to be 1900-001 for the first form, followed by 1900-002 etc.

I don't know how to make it to use 2011 (current year) so that the form numbers become 11-582 for this year, and then change to 12-001 once we hit January 1st.

Thanks for your patience!
 
Joined
Jul 29, 2001
Messages
21,334
Here is a simple way to do it with the after update event. Enter some number in text2 and hit tab.
 

Attachments

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top