Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PO Number

Status
Not open for further replies.

rodrunner79

IS-IT--Management
Dec 27, 2005
144
US
Hi guys, please read my notes on the image I posted, it should provide enough info on what I'm trying to accomplish.
PO.jpg


So can this be done? If so, how? I was thinking more like a function in a module I can call when the form loads (the form that assigns the PO). But I do not know how to write the code. Please Help


Thanks,
Rod
 
Have a look at Format(Format(Date(), "y"), "000"), Nz and DMax

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Have a look at Format(Format(Date(), "y"), "000"), Nz and DMax
I'm sorry I do not get it, I'm fairly new to VBA so please explain to me like I'm a 2 year old. I'm trying to insert that line as an expression in the textbox control source and i'm getting an error. Please clarify on what you want me to look at or do.
 
Okay I see, you're the 2nd or 3rd person to say the link don't work, I'm sorry for that, I changed the link on the image. I uploaded the image into a secure site, so you will have to accept a certificate to view it... The prompt will appear in about 5 - 10 seconds, please be patient....

10...9.........5...4...3...2...1
Displaying image now...

PONumber.jpg
 
When you say Julian date I have to assume you mean the incremental day of the year even though that is not how I understand Julian dates.

It's like PHV said, you have to use the functions like he cited to build the string.

The first 7 characters you already have -> X00000-

To get the day of the year for the current date, you can use
Code:
Format(Format([Date], 0) - Format(CDate("12/31/" & Year(Date) - 1), 0), "000")
That will count off the days from 12/31 of the previous year and format it in three-digit fashion.

To find out how many numbers have been used for a given day, you can use DCount and Mid for that. Take a look at DCount and Mid functions in help and let us know if you have any trouble.


HTH


John



When Galileo theorized that Aristotle's view of the Universe contained errors, he was labeled a fool.
It wasn't until he proved it that he was called dangerous.
[wink]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top