473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Generate Unique report number

Hi There I have built a ticket system with form on Access.

I wish to have a report number made up of

FT,MM,YY,ID of the case

So like this today's date is 09/02/12 and the ID of the record is 26 it would be.

FT021226

Could you please advise me how :) many thanks
Feb 9 '12 #1
3 1592
NeoPa
32,556 Expert Mod 16PB
There are two vastly different answers to this depending on whether the question is about VBA or SQL. The question should have included this important information of course!

VBA :
Expand|Select|Wrap|Line Numbers
  1. Something = Format(Date, "FTmmyy") & [ID]
SQL :
Expand|Select|Wrap|Line Numbers
  1. Format(Date,'FTmmyy') & [ID]) AS [ReportNumber]
Feb 9 '12 #2
Hi NeoPa,

Thank's very much.. It was as VBA sorry for the confusion.

However when I try and use [ID] it error's with:

runtime error 2465- "Microsoft access cant find the field "I" referred to in your expression"

I think it would need to detect the last ID and add 1 to it. Is that possible? Thanks
Feb 9 '12 #3
NeoPa
32,556 Expert Mod 16PB
I'm good, but not that good. Reading minds is something I'm still working on. The problem here is that you haven't provided a question that anyone can sensibly work with. This is unfortunate as there are threads in this forum which are there specifically to help you do that.

Nevertheless, I've provided the information requested, even if I was unable to use the items you have available to you. I would have thought that you would know how to refer to the ID item (It's not very clear even what type of an item you have so there was little I could do to help on that score) as you presumably must know what your question is about, even if we cannot (yet).

The solution is to provide the basics of the question and get a fuller answer to this question. That doesn't include changing the question. If you'd like to ask a question about something else then please do so, but not in this thread. Detecting the last [ID] value is possible, but if you need to ask about that then a new thread is required (Please give proper consideration to how that question is presented before posting it).
Feb 9 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mullin | last post by:
I need to generate a unique no. in the format like yyyymmddxxxxxx (xxxxxx 6-digitl running number) I think of create a table with two columns date value 20050405 120 20050406 99...
10
by: Mamuninfo | last post by:
Hello, Have any function in the DB2 database that can generate unique id for each string like oracle, mysql,sybase,sqlserver database. In mysql:- select md5(concat_ws("Row name")) from...
1
by: Robert Davis | last post by:
I would like to be able to create a recordset in MS Access 2000 that allows a macro to run and create a report for each ID that appears in the recordset. So I thought that I would use a scheduling...
2
by: Chris Dunaway | last post by:
I have a web service which is accessed by a windows forms application. When the application submits a unit of work (a "job"), I want to return a job receipt or tracking number back to the...
28
by: Nina | last post by:
I need to generate unique id for my application. Use system time to create id, which is the best fit, but I don't know how to do it. Please help. Thanks in advance for any input.
16
by: Mark S. | last post by:
I'm a fan of the GUID, but the current project is looking to use a genuinely unique integer. Does the following do that? Math.Abs(System.Guid.NewGuid().GetHashCode()) TIA
15
by: Ashish Khandelwal | last post by:
As MSDN is not giving us guarantee upon uniqueness of Hash Code, so could any one suggest me that how to generate a unique Hash Code for same string always, and generate different-2 Hash Code...
4
by: gaurav1983 | last post by:
i have to generate unique combinations of given number of digits entered by user eg: N=4 (0,1,2,3) output should be 0 1 2 3
1
by: situ | last post by:
Hi, I'm using DB2 V9 for windows I'm inserting records into DGTT from select statement; the problem is how to insert unique value for every row inserted. I tried using “generated always as”...
12
by: Ivan Popov | last post by:
I need to generate a unique serial number for each field in the table. The serial number shall consist of two letters and six numbers, for example AA123456. Someone can suggest how to do it in MS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.