My Assistant
![]() ![]() |
|
|
May 5 2012, 01:40 PM
Post
#1
|
|
|
UtterAccess Guru Posts: 678 From: Singapore |
How do you convert the current date to a number?. Example May 6 2012 to 20120506. I want to use this number as a BarCodeID for incoiming stock.
|
|
|
|
May 5 2012, 02:03 PM
Post
#2
|
|
|
Utterly Yorkshire and Forum/Wiki Editor Posts: 15,895 From: Devon UK |
Hi
The following expression should do it - CODE CLng(Format(Date(),"yyyymmdd"))
|
|
|
|
May 5 2012, 02:06 PM
Post
#3
|
|
|
Access Wiki and Forums Moderator Posts: 48,593 From: SoCal, USA |
|
|
|
|
May 5 2012, 03:00 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 8,189 From: Pacific NorthWet |
I'll echo DB's question ... can you guarantee you will NEVER have more than one "stock" incoming per day? (If more than one, consider using date AND time for that identifier... better still, use an autonumber field for the primary key on the table, and include a date/time field to show when...
|
|
|
|
May 5 2012, 03:01 PM
Post
#5
|
|
|
UtterAccess Guru Posts: 678 From: Singapore |
Thanks Alan, for the tip. I use it for my first part of my BarCodeID.
Hi DBguy, you 're great. No I do not have only one stock Received per day. sometimes a few hundreds. Actually I've two more fields [1] Stock Received ID [SRID] and [2] ItemTotal [IRTL] I combine them to form the BarCodeID. The work-flow is very simple - Open the Stock Received, click an Icon, open a pop-up form, transfer the SRID over and the User enter the number of items received [IRTL]. Click Print and it will print the [DateSerialNumber - StockReceivedID - Number of Items.] If the Number of Items are 10, then 10 labels printed. The DateSerailNumber also act as the source of the expriy date of items. You think this will work? My 6 cents. |
|
|
|
May 5 2012, 10:02 PM
Post
#6
|
|
|
Access Wiki and Forums Moderator Posts: 48,593 From: SoCal, USA |
Hi,
Yes, I think you're alright. Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th June 2013 - 06:26 PM |