Create A Unique Identifier
Aug 22, 2006Hi All.
Is there a way to index and create a unique identifier using a combination of fields (eg. User# + Provider + Date)?
Thanks.
Hi All.
Is there a way to index and create a unique identifier using a combination of fields (eg. User# + Provider + Date)?
Thanks.
I'm looking into create a small unique identifier to put on top of each invoice generated by the database. (.MDB A2010)where '000' its just 3 zeros added for extra badassery, '1' is the actual ID from the database table and -2014 its the current year when the record was added...So maybe I have info from 2 fields (ID, YEAR)... but How do I add the ceros to the ID field... so its 0001 not 1 or 0135 not 135... ???.
View 5 Replies View RelatedAny way on a table that I can have a unique identifier over two fields? E.g.I have a login ID and a Domain field in a table with sample data below.
Login Domain
John Test
Jane Test
Fred Live
John Live
The login names need to be unique to the domain so the integrity cannot be breached. This has to fit into one table (although the domain is actually being pulled from a look up table so is in fact a numerical value) for ease of form creation.
I have a database in Excel that contains farmers who can be identified by a Unique identifier: MZ-01-0001. The registration details for these farmers are not always up to date. Now when I try to append the data for the farmer with MZ-01-0001; with the primary key set on the Unique identifier, Access does not want to do it since there is already a record in the system. When I remove the primary key it doubles the record, which is also not what I want. So I am wondering what I need to do to append the record while keeping the primary key intact.
View 4 Replies View RelatedI'm currently in the process of doing a an overhaul of the database including a table, some odd 17,500 records long.
What I need to do is to create a unique identifier from the existing part number, almost like an autonumber, but it only increments when there are duplicates. What I mean is that there would be for example, there would be five records of say, part 000135.
What I'm trying to get at is, how I would have to code to grab the existing part numbers (all formatted to be 6 digits), add an extra 2 digits to be its unique identifier, and then save it all to a Unique Identifier column, that I created.
An example of what I want is say, I have part numbers 000135 and 000136. The numbers would go up from 000135-01, 000135-02, 000135-03, 000136-01, 000136-02.... The dash is not as important as implementing the 2 digit unique identifier.
I have a large table with information about different cars, called "Car Metadata". In this, each car has a unique identifier ("Car Code"), the make ("Manufacturer Name") and the model ("Short Model").
What I want to do is create a form with dropdown menus.I have a first combo box with all the makes in the Metadata table.
What I am having trouble with is that I want a second combo box underneath which would only show the models which correspond to the make selected in the first box.E.g. someone could select Ford in the top box and the second box would only show Fiesta, Focus etc.
Once it has done that I want it to be able to write the Car Codes for the records which match up to the make & model selected to a new table. Just to complicate things further, there can be multiple records with the same make and model but different Codes, I want all these multiple codes to be written to the final table.
Hi,
I wonder if someone can help with what must be an easy solution to this problem.
I have a table with 350,000 records, but without a unique identifier field. I just want a simple incrementing number field to become the primary key but dont know how to add this in. I cannot add an autonumber as there are two many records - it falls over.
Ive tried exporting it all to excel, but as well as being cumbersome, something went wrong and so I'm back to square one.
I think there must be a way to add an incrementing number either via a query or in VBA but I dont know how. Please can somebody provide a solution.
Thanks,
Adam.
To prevent duplicate records, I use multiple fields indexes, which worked fine until now. I learned that each "empty" fields are consider unique by Access, so not the best in an index to prevent duplicate records. I managed to have it worked using the default value property to give each "empty" records the same value.
Now my problem is that I have a date field which is optional, but I need to use it as a unique identifier in an index. I could again use a default value, but since it has to be a date, I find it confusing. I would rather have a default value of "No date specified" or "-" or even better, "". Unfortunately none of those works with date fields.
Have a table with data in it and I want to add a new field to uniquely identify each record (simple numerical sequence like 1, 2, 3, 4.....). I don't know VBA and don't know SQL.
Tried opening the table in design view, adding a new field with "autonumber" as the data type but get the following error msg: "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry". The table has about 750,000 records in it.
So i have a access database with a main field that we can call vendor # (LIFNR) and another called Company code (BUKRS). There are multiple company codes under a single vendor #. Example:
LIFNR
BUKRS
0000010535
1010
0000010535
5060
0000010535
5610
0000010536
1010
0000010536
5060
0000010536
5610
What I am trying to do is create a 3rd column where i can have a unique row for each of these fields without it repeating. There is no unique identifier in this table and that is what i am trying to achieve.
Hello i want to create a tracking number based on information entered into a form.
So i have my main table called "MainData" and this is in the backend and linked through to the front end where my form is.
I then have a query which is called "calllog" which has a field called "Call Number" inwhich i placed the following
=Year([Date]) & Left([CustomerName],3) & Right([Date Created],2)
This then gives me a unique number. Once i have entered a job in it will generate a number. Now this part works fine but it does not update the Maindata. How can i get the this to transfer the data to the maindata table???
I have a form with a combobox where I select the Carrier witch then populates a multiselect listbox with all the record from that carrier in the specified date. When I select them and click save I want all the record ID(ConID) saved under the same ID(manifest ID) ie,
1 223
1 225
2 344
2 4444
Ect
It saves it in a table called Manifest With the fields Manifest ID and CONID which is a lookup field to a different table. Here is my current code for the on click command
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Manifest", dbOpenDynaset)
[Code] ....
Now I've done some searching and I thin dmax is what I want to use.. But I am not sure how to make it work...
I have a table as followed;
EmployeeID: PK
FirstName
MInitial
LastName
Company:FK
Department:FK
What I want to do is create a new field that automatically populates based on what is entered into the above fields.
Essentially creating a single field with unique data generated by multiple fields.
For Example if I entered the following informaiton:
EmployeeID: 1 (AutoNumber)
FirstName: John
MInitial: P
LastName: Doe
Company: FederalGov
Department:Test
The new field can be generated as followed: JohnPDoeFederalgovTest
What i plan on doing with this is making this "generated" field an index so no new duplicated records can be added.
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
How i would best combine values in a table to produce a 'primary key id number.'
For example: the first letter of a city in the ID and the next number available/auto number - Portsmouth -> P233
I know i can create this in a query however i want it as the unique ID for that record entry in a table. If that doesn't make sense i can try to elaborate some more.
I am trying to create an automatic unique 'number' (actually text) in a form. Here is an example of the format...
1456.R1
1456 is the project number
R stands for revision
1 is the first revision
So, in this database there could be 1456.R2 etc. but there could also be other project numbers, say 2323.R1, 2323. Looking for expression I need to enter to have Access look up the last revision for a specific project and then add 1 to it?
if I got a 4 x 4 matrix table - 4 rows and 4 columns - MS Access 2007/2010 the values should exist as below with no repetition of any number in any of the cells.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
a number should not repeat in any of the cells.I set a primary key on cloumn 1 and defined unique on all the fileds but that doesn't work since 1 columns does not know what the other cell contains and no relationship exists.
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.
I have created a linked Excel table in Access 2010 called 'tblExcelLinked' and I have a form called 'ASB Log Form' for the purposes of presenting the data in a more readable manner that is easier to view, plus link other fields of data that are not directly related to the 'tblExcelLinked'.
Because there is no unique ID in the 'tblExcelLinked' to create a relationship, I have created a table called 'tblASB', which allows me to add other table data linked from same d/b.
I now want to update the 'tblASB' with data from the 'tblExcelLinked', but only append new records from 'tblExcelLinked', but my inadequate append query is duplicating the records each time I run it, rather than just adding the new ones.
Once sorted my next challenge is a macro so that this runs automatically rather than being manually triggered.
I have a table - (Table A) that has 2 fields X and Y. I would like to write a query or script to make two new tables based on the unique values found in field X. In other words, all data where field X = 1 would be written to a new table called "1" and all data wehre field X =2 would be written to a new table called "2".I would like this done automatically.
Table A
Field X Field Y
1 a
1 b
1 c
1 d
2 a
2 b
2 c
Is there a way of merging 2 fields together to create an additional field
my database consists of 4 main tables (in order of relationships)
*HeadOfficeDetails
*SiteDetails
*ContainersOnSite *Contracts2015-2016
For example;
Account Reference: TEST
Site Number: 001
and the field i would like to have;
Site Reference: TEST/001
I would also like that when i add a new site to that account i will have TEST/002....
I want Access to automatically generate a reference number for a record based on the values in on two other fields for a given record using a form.
The first field is called Operation Number.
The second is Bag Number.
The reference number needs to be in this format: 19C.3.1
Where 19C is the Operation Number, 3 is the bag number, and 1 is automatically generated. Additionally I need the last number --the automatically generated one--to go back to 1 if with each new bag number.
This is kind of like library catalog numbers. Not sure how to do this.
hello,
In excel i used the following formula =IF(COUNTIF(U$2:U$900,U3)>1,"Duplicate","")on one field to find duplicate, but I cannot come up with similar formula on column fields in a table.
Any guidance?
Thank you in advance
Niri
I have a database wit the following fields
have a database with the following Tables
tblCD/Main: CdID - autonumber, CDName - text ...anything else will be a lookup field that we will get from another table, so we will come back to this table
tblAuthorType - AuthorTypeID - autonumber, AuthorTypeName - text. author type name will have, as I see it, 3 types : Composer, Group, Artist.
tblAuthorName - AuthorNameID - autonumber, AuthorName - text, - the name of all authors, composers and artists that u will pick from later
tblecdtrackautonum-trackname track number
Each Artist will be the same for Each CD
the tblCDMain add a AuthorName - lookkup to tblAuthorName
The lookups I understand fine it's relating the identifier the same in both places. I want to have list boxes that display cd groups and cdname the cdnames related only to those groups
How do I try relating the cd name table
to the track listing on the field of cd identifier which is the same in
both places. IS the identifier the same for the primary key
Should put together a query between the two tables, and relate them on that
one field (cd id) then the query will pull the tracks which are listed for
that id and the cd names which are listed for that id.
I need help with this to figure out the identifier is it cdname and cd tracks?
Please someoen help I need a response based on tables for my database NOT ON A DATABASE FROM A BOOK WHERE I CANT SEE A CONNECTION LIKE A PLANTS DATABASE THEN I DONT KNOW IF PLANTS IS THE SAME AS FOR THAT ID. ANY HELP APPREICATED/
mikevds@optonline.net
I have a database with several tabs. On each tab is a form in datasheet view. I have a field that when clicked, will open the corresponding form in a dialog. The code used to open the dialog is: =IIf(IsNull([SalesOps_ID]),"(New)","Open") This creates an underlined Open link which, when clicked, opens the dialog.
An embedded macro is attached to this code, telling it which dialog form to open...and a bunch of other stuff I really can't explain (I'm great at stealing shamelessly from other similar projects but don't completely know what the heck I'm doing).
That said, all the other dialog forms work splendidly using this same type of embedded macro, except one very stubborn dialog form that is giving me fits! Interestingly enough, this form has a subform (all the other forms don't). The form opens, I can edit data on the main part of the form, but if I enter data in the subform, when moving to the next record, I get the error message: The identifier [Tasks].[Project ID] could not be found.
Interestingly enough, I don't have any tables, forms, queries, macros or fields that contain anything like [Tasks] or [Project ID]. If I move off the main record, then return to the record, the data in the subform does not display (however, it is in the table - just not displaying). As if that isn't interesting enough, when I open the dialog form on its own, without using the Embedded Macro from the datasheet form, all that data shows just fine and the form works like it's supposed to.I wish there was a way to simply copy all the text from the macro here, but I can't seem to figure out how in Access 2013.
hi guys, i am slowly learning access by browsing these forums and using microsoft help and downloading example databases. problem is - i have no formal training in it and am just sort of poking around. how did you guys learn? is there a good book out there to read, or did you take a course in it?
right now i am trying to develop a database of tracking product through a factory. technicians would scan the barcode for a pump before and after every process. i made it a simple table coupled with a form where they input the barcode # and a timestamp was coupled with it. later, youd be able to graph the time stamps so you can see process times, how many are in work in process, etc.
my specific questions are:
when i use the timestamp feature, it updates the time when a new record is brought up, but i want the timestamp to register when they click the add entry button. so far i have the default value =Time() for one, and =Date() for the other ...
next is, i want each workstation with this open to have its own unique identifier. for example, one program in assembly station should automatically input "assembly" for where the record was added in, how is this done?
lastly, i have a barcode scanner that operates like text input, i have an area on the form for the barcode, so when it scans it enters the number. is there a way that once the field gets 8 digits entered into it, it automatically goes to the next field on the form? i would like for users to pull the trigger and not have to hit enter again ...
a big THANK YOU for all you access gurus, i have been browsing these forums learning a lot. i hope i can achieve your level so i can help others as well. Thanks again
- Dave