473,770 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic Tracking Number

I need assistance in creating an Automatic tracking number that
appears in a textbox that looks like: 2004-001. The first part of the
number is based on the year, the second part is generated from the
last available number used. Also, the second part of the number needs
to start over whenever a new year is started. for example: 2005-001.
Any help would be greatly appreciated.

Thanks,
pjac
Nov 12 '05 #1
4 2365
try for the controlsource of the control:

=format(datepar t(date(), "yyyy"), "0000") & format([id], "000")

or something along those lines

"pjac" <pj**@erols.com > wrote in message
news:94******** *************** ***@posting.goo gle.com...
I need assistance in creating an Automatic tracking number that
appears in a textbox that looks like: 2004-001. The first part of the
number is based on the year, the second part is generated from the
last available number used. Also, the second part of the number needs
to start over whenever a new year is started. for example: 2005-001.
Any help would be greatly appreciated.

Thanks,
pjac

---
Please immediately let us know (by phone or return email) if (a) this email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004
Nov 12 '05 #2
pjac,

The posted formatting ideas may be useful but your question requires a lot
more of an answer.

I often have a table, tblAppVariables for containing values that change over
various times and situations. I put a variable name and then the variable
argument into the table so that I can search the table for the named
variable and get the current value of arument. For example: field VarName:
MyYear might contain "2004" and field VarArg: MyYearlySequenc e might contain
"123". Do not make this table available or even visible to your users!

You need to write vba code to test the current year against MyYear. When
the year part of Now() is greater then you store the new value in MyYear and
store "000" (or what ever your first number for the year is) in
MyYearlySequenc e. In your application there should be only one place that
would use the code so the code logically belongs there. If it might be
called from more than one place then put it into a function procedure and
call the function where ever you need it.

HTH
--
-Larry-
--

"WindAndWav es" <ac****@ngaru.c om> wrote in message
news:B3******** ***********@new s.xtra.co.nz...
try for the controlsource of the control:

=format(datepar t(date(), "yyyy"), "0000") & format([id], "000")

or something along those lines

"pjac" <pj**@erols.com > wrote in message
news:94******** *************** ***@posting.goo gle.com...
I need assistance in creating an Automatic tracking number that
appears in a textbox that looks like: 2004-001. The first part of the
number is based on the year, the second part is generated from the
last available number used. Also, the second part of the number needs
to start over whenever a new year is started. for example: 2005-001.
Any help would be greatly appreciated.

Thanks,
pjac

---
Please immediately let us know (by phone or return email) if (a) this

email contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004


Nov 12 '05 #3
BOT
Nov 12 '05 #4
Oops!

I left out the sequence number bit. You probably have figured it out
already but in cases where the year now is the same as the year saved then
you will retrieve the current sequence number, increment it, save it to a
variable and store the new value back in the table. Then concatenate your
formatted year-sequence and use it as needed.

HTH
--
-Larry-
--

"Larry Daugherty" <La************ ********@verizo n.net> wrote in message
news:Jb******** ***********@nwr ddc02.gnilink.n et...
pjac,

The posted formatting ideas may be useful but your question requires a lot
more of an answer.

I often have a table, tblAppVariables for containing values that change over various times and situations. I put a variable name and then the variable
argument into the table so that I can search the table for the named
variable and get the current value of arument. For example: field VarName: MyYear might contain "2004" and field VarArg: MyYearlySequenc e might contain "123". Do not make this table available or even visible to your users!

You need to write vba code to test the current year against MyYear. When
the year part of Now() is greater then you store the new value in MyYear and store "000" (or what ever your first number for the year is) in
MyYearlySequenc e. In your application there should be only one place that
would use the code so the code logically belongs there. If it might be
called from more than one place then put it into a function procedure and
call the function where ever you need it.

HTH
--
-Larry-
--

"WindAndWav es" <ac****@ngaru.c om> wrote in message
news:B3******** ***********@new s.xtra.co.nz...
try for the controlsource of the control:

=format(datepar t(date(), "yyyy"), "0000") & format([id], "000")

or something along those lines

"pjac" <pj**@erols.com > wrote in message
news:94******** *************** ***@posting.goo gle.com...
I need assistance in creating an Automatic tracking number that
appears in a textbox that looks like: 2004-001. The first part of the
number is based on the year, the second part is generated from the
last available number used. Also, the second part of the number needs
to start over whenever a new year is started. for example: 2005-001.
Any help would be greatly appreciated.

Thanks,
pjac

---
Please immediately let us know (by phone or return email) if (a) this

email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004


Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2436
by: Shanfeng Cheng | last post by:
I write a piece of code to tracking the number of clicks on a link each day. The link usu. gets about 3000-6000 clicks per day. I just store today's click count in a one-line text file, like, 01/07/2004 1234 The first field is the date and the second field is number of clicks. I just read the current count, increase by 1 and then write back. When another day comes, I write today's count to mysql DB.
12
5164
by: Dan Greenblatt | last post by:
I am writing some software that, among other things, needs to track the state of database tables. This includes occasionally checking the table to see what records or added, modified, or deleted. The added and modified parts of this have not proven too difficult to implement, but is there an easy/elegant way to determine what records have been deleted from a mySQL table ?? I'm very to mySQL, and after reading through the docs about logs,...
3
2818
by: Kyle Friesen via AccessMonster.com | last post by:
Mike, I have databse that creates a "tracking number" based on the selections made on the form via concatenating. At the end of the tracking number, I need a two digit (01-99) sequence number by product group for each customer. Hpw do I do this without creating a table for each customer and each product group with autonumbers. For example based on the entries in this sample, the desired result would be: Customer Business Unit Tracking...
2
2455
by: anony | last post by:
Maybe this feature is already out there. I guess you could write triggers to do some of this. Often when designing a database I add a start_date and end_date column to the table. The start_date is when the record was created and the end_date is when the record expired. For UPDATES, I populate the end_date and INSERT a new record. This allows you to track changes though out time. I do this so often I thought it would be a good idea for...
2
1861
by: Lawdawg via AccessMonster.com | last post by:
I have been task with writing an Inventory Tracking program for my group and ran into a small problem. I have two numbers used in issuance of inventory (1) and item number (2) a serial number both of these are set for no duplicates so the same item is not issued twice. One number is set for one office as they need an item number to track issued items and the another office uses a serial number as they do the purchasing. My question is,...
2
2565
by: Jan Paul van de Berg | last post by:
I have a piece of software that people can download and a third party promoting that software. In order for them to be able to count the number of downloads, I have to put a tracking code on my site. The tracking code must be sent to the client when the user clicks the download button. At the same time, the download must start. The download button links to this page: - Possibility 1, server side redirect to executable...
1
16222
by: bdockery | last post by:
So I figured out that if you use this html: http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en_US&InquiryNumber1=<TRACKING NUMBER HERE>&track.x=0&track.y=0 it will link you directly to the UPS tracking page for the specified tracking number. I think it would be really cool to be able to click a tracking number record in a table and have it take you directly to the...
5
4019
by: dee | last post by:
My wife is school secretary who inherited the job of tracking about 100 keys to about 150 school employees for thee next school year. Their current system, comprised of 2 non connected spreadsheets, is a totally useless inaccurate mess. I thought I might be able to help out by making a simple access database, but think I bit off just a little more than I can handle. My idea was to create 2 tables:
5
2796
by: trss | last post by:
Has anyone experienced automatic memoization by any C++ compiler before? The program coded as a solution for the problem based on the famous 3n +1 problem, both of which are given below, is automatically memoized. Is it due to caching of return values or something else? The point is, does this program exhibit some property which leads to automatic memoization by the compiler? Which can be satisfied by other programs too to make them...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.