General :: Auto Generate Unique Customer IDs
Aug 16, 2012
I am in the process of creating a DB for customer names, job numbers and document numbers, but have run into a problem right from the start.We are using a naming convention of the first 3 letters of the customer name, and 3 numbers after that. Eg. Customer names Allstar, Allpro would be All001 and All002 respectively.
The job numbers would then be sequential numbers, for each customer. So the first job for Allstar would be All001-001 and so on.How do I get Access to check/create the customer ID's? And then how do I get Access to check for the next job number for each customer?I was able to do this in Excel with the following;
=LEFT(B12,3)&COUNTIF($B$3:B12,LEFT(B12,3)&"*") in one cell
=IF(B12="","",LEFT(D12,3)&TEXT(RIGHT(D12,1),"00")) in another to add the preceding zero's.
Obviosuly , Excel is not the best way of tracking customers, jobs, documents etc.
View Replies
ADVERTISEMENT
Dec 11, 2013
I have a Table Sales - that lists customer and order information
Most of the customers are new - is there a way to populate Customer Name Table with a new entry each time a new customer is input into the Sales Tale
(Without having to add the custome to Customer Name Table - then going to Sales Order)
OR
Failing that - is there a way to use a list box that points to Customer Name Table (and if it doesn't find the one you want, will allow you toadd a new record) In the SAME form as you use to add to Sales Table.
So:
Date (textbox linking to form.Sales) Customer Name (List Box linking to form.CustomerName + adding the info to form.Sale)
View 6 Replies
View Related
Jan 17, 2014
I Want to automatic Generate the Numbers (Me.RID) when everytime loading the form.
EXAMPLE "14011701", "14011702", "14011703", "14011704"....
140117 mean "yymmdd" and the last 2 digit mean autorun Number.
But in the next day 140118 I want the last 2 digit auto Reset and start form 01 example "14011801", "14011802", "14011803", "14011804"....
Same also for day 140119, "14011901", "14011902", "14011903", "14011804"....
Below is my incomplete VB code, i dont know how to reset the last 2 digit every day.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Private Sub Form_Load()
Dim RNos As String
RNo = DLookup("[RNos]", "Temp_Table")
Me.RID.SetFocus
Me.RID = Format(Date, "yymmdd") & Format(Val(Right$(RNo, 2) + 1), "00")
DoCmd.SetWarnings False
DoCmd.RunSQL "update Temp set Temp_Table.RNos = '" & Me.RID & "'"
End Sub
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
View 12 Replies
View Related
Jul 10, 2012
I have
Table called "Products"
Field 1= "Product ID" which is a text field (PK) but numbers are used (ie 1 -20)
Field 2= Products -showing our list of 20 products
When I enter a new product, currently I have to look in the table to find the last ID used then use the next one available. I have created a form to be used for data entry to enter new products
What I am trying to do is :- 1, have the form open at data entry level but still able to scroll and see all records and 2, Have the form auto generate the next number available. For example, I have 20 products entered so when the form opens to enter a new product, the ID is automatically at number 21. I know absol nothing about coding. I have looked at other suggestions on the forum incl the DMAX +1 and having tried and not worked, I wondered if its because the field is a text field or I am trying to insert the code in the wrong place.
View 4 Replies
View Related
Jul 1, 2013
We have a large split database with 3 users on a single site. We will soon be increasing this to 6 users across 2 sites.
One of the fields in the main table is "report number" where a line is given a unique number. Not every line is given this number, as it depends on the finished status of the product.
The numbers are currently hand written onto a sheet as they are used, which obviously avoids duplicates. This however will be near on impossible once the database is shared across 2 sites.
the format of the number is 00/0000 where the first two digits are the year, and the last four increase sequentially.
Is there a reasonably easy way to incorporate this into the database itself, where a number can be generated as required, as apposed to every time?
View 14 Replies
View Related
Jul 10, 2012
I have
Table called "Products"
Field 1= "Product ID" which is a text field (PK) but numbers are used (ie 1 -20)
Field 2= Products -showing our list of 20 products
When I enter a new product, currently I have to look in the table to find the last ID used then use the next one available. I have created a form to be used for data entry to enter new products
What I am trying to do is :- 1, have the form open at data entry level but still able to scroll and see all records and 2, Have the form auto generate the next number available. For example, I have 20 products entered so when the form opens to enter a new product, the ID is automatically at number 21.
I wondered if its because the field is a text field or I am trying to insert the code in the wrong place.
View 1 Replies
View Related
May 16, 2013
I am looking to have entries made to the table based on a date range. I have a database of events and most repeat daily, weekly, etc. When I enter them into Access, they go in as a single entry with a start and end date. But I need to have them as individual entries for each day so that rather than one entry of 5 days, I need to create 5 entries of one day each.
View 5 Replies
View Related
Sep 7, 2012
create a check on a feild(customer id) of customer table in MS Access , as "Customer ID is of 8 characters, the first 4 are alphabets and the last 4 are digits"
View 6 Replies
View Related
May 31, 2013
I'm creating a database using existing data from an excel file full of contact details. What I need to add is a queue type system where each contact in the database has a "Place in Queue" number which is unique obviously.
Lets say Alan is number 1, Bob is 2 and Chris is 3. They have these corresponding numbers in the queue field for their entries.
Now what I need to have, through use of a form, is a way of changing Chris from number 3 in the queue to number 1 and thus have Alan automatically shift down to number 2 and Bob to 3.
View 4 Replies
View Related
Oct 3, 2012
how do i get form to generate a new order ID for the same customer in my orders table
View 2 Replies
View Related
Apr 4, 2013
So I have this field in a form/table called "CustomerID". This is to be an ID number for our customers that includes the first four letters of their last name (LastName field) followed by four digits.
This ID is created when a button is pressed in the form. After that, code needs to grab the first four letters of the last name (LastName field in the form and table) and then go to the Contacts table and see if there is already a CustomerID that starts with those four letters. If there is not, then the CustomerID will be those four letters followed by "0001". If there is, it needs to be those four letter followed by the next number sequence that still does not exist for those four letters.
For example:
First four letters of last name = zabo
Check to see if those four letters exist in CustomerID returns negative then
CustomerID assigned = zabo0001
Another example:
First four letters of last name = zabo
Check to see if those four letters exist in CustomerID returns zabo0001 and zabo002 then
CustomerID assigned = zabo0003
View 7 Replies
View Related
Mar 6, 2014
I am trying to take a table that looks like this:
Customer Name
Fruit
Customer A
Apples
Customer A
Bananas
Customer B
Pears
Customer B
Apples
Customer C
Pears
And create a table that looks like this:
Customer Name
Apples
Bananas
Pears
Customer A
Apples
Bananas
Customer B
Apples
Pears
Customer C
Pears
I think this is relatively simple but don't know the syntax to create this table.
View 2 Replies
View Related
Jun 2, 2014
I'm trying to get an invoice number field to auto generate the next number, keeping the format as "00000"...this is what I have, which gets the next number but drops the leading 0
Code:
Private Sub Customer_AfterUpdate()
If Len(Me.[InvoiceNumber] & vbNullString) = 0 Then
Me.[InvoiceNumber] = (DMax("[InvoiceNumber]", "[tblInvoiceNumber]") + 1)
DoCmd.RunCommand acCmdSaveRecord
End If
End Sub
invoice numbers are 04024, 04025 etc...how I keep the formatiing?
View 5 Replies
View Related
Nov 19, 2007
We are trying to use Access to generate, job, task and craft numbers in Access. Job and task will be unique. Craft numbers can use the auto number function. We need the numbers to be 4 digits for Job and Task.
View 2 Replies
View Related
Sep 6, 2013
I am using a API to generate a random / unique directory. This an API form a 32-bits environment.
I know that you can still use it when declaring it with PtrSafe
This is the code I am using:
Option Compare Database
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long
[Code] .....
View 1 Replies
View Related
Jun 10, 2015
Need to generate a unique reference number each record wise while data entering by a form. How to do this by using a command button ? After entering all fields related to the record, when click on the command button, unique reference number for that record need to be generated and save with all other data of the records. in a later event, need to recall the record by using this reference number and also need to make relation ship with some other table by using the reference number.
View 6 Replies
View Related
Oct 5, 2013
Basically what I have is a database for tracking/logging parcels that arrive to the office. I want to be able to generate a reference number based on the date of arrival: i.e. the reference number should be ddmmyy### where ### is a sequential number. I know that I could just use the primary key's autonumber, for the sequential number but if I do this then the sequence will not restart at 1 on each date and because we receive a lot of parcels the reference number will grow to be too big to print out on the collection slips in just a few months.
two tables (one with the date and staff on duty that day and the other with the parcel's info') with a one to many relationship
I also have a query (Named: FullLog) that picks up the following data from the tables:
Name - Description - Size - TrackingInfo' - Staff - DateReceived - Count
The field named Count is a DCount function that I used to find out the number of times each date is repeated. This is the Expression that I used:
Count: DCount("*","FullLog","DateReceived = " & [DateReceived]) [Note that DateReceived is first converted into a string using CStr()]
This is as far as I have been able to get, I have been looking for weeks for a solution to this problem but I have yet to find one. I don't even know if the DCount function is the correct way of doing it, I did read somewhere that this produces a very slow query.
Effectively what I want to be able to get is something of that resembles the following
DateReceived - ReferenceNo
051013 051013001
051013 051013002
051013 051013003
061013 061013001
061013 061013002
071013 071013001
071013 071013002
071013 071013003
071013 071013004
071013 071013005
081013 081013001
081013 081013002
091013 091013001
101013 101013001
View 6 Replies
View Related
Sep 27, 2004
Hi,
I am v new to Access and am creating my first DB.
I want to create a unique client office code....
For example, for a (law firm) client name Brown Smegmore in Sydney,
I want to create a code like BS_S_1, Brown Smegmore in Melbourne: BS_M_2
etc
I would really really like some simple help
cheer
Deano
View 3 Replies
View Related
Feb 2, 2005
can I make a field that can auto-number which the format that I want??
As I know that there is two format for auto-number
but I don't like them
I want to number my own format
like
XXX-YYYYMM-ZZZZ
XXX is the category number that would be selected in the form connecting to table
YYYYMM is the date year and month
ZZZZ is another auto numbering
Can I do so
View 1 Replies
View Related
Jan 18, 2007
Hi i am new to Ms access, and i wanted to know how i could go about to create an auto generating number field that contains letters and numbers, e.g. a computer serial number.
Your help would be most welcomed
View 1 Replies
View Related
May 26, 2005
Does anyone know how to write a simple method of having a text box on a form default to the first day of the current month. i.e. 01/05/2005 and then a second one equalling the last day of the current month i.e. 31/05/2005?
I can make it simply default to today by having the obvious =now() or =date() in the default section but i am bit stumped.
Any help would be greatly appreciated
Cheers
Alex
View 2 Replies
View Related
Feb 3, 2015
I have a database studentreview. with the name of the student, the location of the student the course and the status of the course. What I am trying to do is when a condition is meet the name of the course "Anatomy" is meet and the status "Done" is meet I want to auto-generate a new record with the same student name with the same town and the course will be "anatomy 2" and status "not done". The name of the student and the location are linked tables with the studentreview table. This is what is did with a record set but clearly I am doing something wrong since nothing is happening
Public Sub AddRecordset()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tblStudentreview")
[Code] ....
View 1 Replies
View Related
Nov 5, 2013
I have a table called bookings, three records within that table are;
arrivaldate
departuredate
breakfast
This Table (Bookings) is linked to the guest table via GUESTID..Assuming that a guest arrive on the 5th and leaves on the 10th, I am trying to create a breakfast voucher for the guest for each day of their stay.
So 5 vouchers, 1 each for the 6th, 7th, 8th, 9th, and 10th.I have created the breakfast voucher as a report and a query to include data but I dont know how to propagate the new data to actually create the vouchers. All I can get is data for the arrival or departure fields.
View 2 Replies
View Related
Jul 1, 2013
I have created invoices as reports but now I'm looking for a way to add an invoice number to it. It needs to be an auto increment number for every invoice for every client.
I have 10 different clients and I want them to have their own incremented invoice number. Every client has it own unique number. So for example in week 1 I want to have the following invoice numbers; 01-0001, 02-0001, 03-0001 etc. In week 2 I want them to be; 01-0002, 02-0002, 03-0002. It is important that every client has the invoice numbers without gaps.
What is the best way to realize this?
View 2 Replies
View Related
Nov 13, 2012
I want to input a number value in [field1], then i want [field2] to generate an auto number BUT i want it to increase based on [field1] THEN combine them into [field3] creating a unique SKU for every item I have.
EXAMPLE1: I will type in [field1]: "001234". [field2]will enter "000001" because it is the first occurrence of "001234" in [field1]. [Field3] will then have a value of "001234-00001"
EXAMPLE2: I will type in [field1]: "002468". [field2]will enter "000001" because it is the first occurrence of "002468" in [field1]. [Field3] will then have a value of "002468-00001"
EXAMPLE3: I will type in [field1]: "001234". [field2]will enter "000002" because it is the second occurrence of "001234" in [field1]. [Field3] will then have a value of "001234-00002"
View 4 Replies
View Related
Aug 29, 2014
I Have a table with 15000 entries. This table lists components we use. This table is used to generate queries/forms. I have been asked to add a hyperlink to this table to link to a drawing of the component. All the drawings are in PDF and in the same folder. I am looking for a way to automatically update the hyperlink fields all at once. The Hyperlink will be in the format of servershareddrawings12345.pdfwhere 12345 is the component name from the table.
But there are a few small problems with the component names.
1. If the component begins with a B- . The drawing name will be all the characters except when there is a second dash in the component. So if the component is B-12345-678 the drawing name will only be B-12345.
2. If The component begins with AB, The drawing will be the first 5 characters regardless of what follows, e.g. AB123.
3. Finally for all other components the full component name will be the drawing name.
Putting the naming to one side, how to go about auto generating the hyperlink. I have posted this in the table section, but maybe this should be in another section like queries or VBA.
View 2 Replies
View Related