Unique Names in Table

I have a table with and ID field that is is the primary key field. I have FN and LN fields in the table.

I have a form to add new names to the table. The form has FN and LN fields and a field to combine the fields into LNFN. What code can I use to make a message popup and tell the user thatthat name already exists in the table and ask the user if (Yes or No) he/she still wants to add the name?

Sponsored Links:

Related Topics

2 data sets of unique names
Imagine 2 lists of unique names -
They overlap because some of the names in the first list are also in the second.
1) Delete the names-in-common from the second list?
2) Make a record of which names these are


Similar Names
My table contains a list of unique last names. I want to write a query that will return all names who have the same first (5) characters. For example:

Smith
Smithe


Unique Values via .rowsource
I have a form which has a few dropdowns. Two of these are firstName and lastName. What I was doing previously was when the form was opened, copy all last name (who had transactions on them) values from the contacts table into a table (indexed no duplicates).

This would automatically give me unique values. The problem is that I added functionality to view two different types of datasets (canceled and uncanceled data).

Each of these tables will have different names so I am now getting the names via the rowsource line. When the radio button is clicked to viewcanceled, I change the rowsource from vba.

The problem I am having is getting unique values again. Right now if there are two smiths, there are two entries in the lastName dropdown for Smith.


Finding similar names between two tables.
I have two tables linked by Name. The names are not unique and may have Corp., or Corp. or Corp in one table and Corporate spelled out in another table. Some may have a hypen separating names etc.

I would like to create a query to see all the records and fields from the table on the left and only a few fields from the second table on the right if the names are similar and state matches.

I was able to create the query but my results are for the exact matches on the name.


Creating unique ID but not for duplicate text rows
I have an excel spreadsheet with about 20 fields. 2 of them include first_name and surname and I want to create a unique ID for each separate entry, however I don't want the same names getting different unique ID's


Adding multiple records in subform
I have one Table titled Audits.

From this one Table I have created two forms Audit (main) and SubAudit (Sub).

Main Form-field names are Unique ID and Date.
Sub Form-field names are Call Date Correct, Correct Part, and Correct Description.

On the main form I have a command button that opens the subform to enter records.

The problem I am having is that when I enter multiple records under the subform it is not entering the Unique ID and Date for all the records entered in the subform.

Here is what I am trying to accomplish if the Unique ID is 106 and the Date is 12/2/2008 and I click the command button to open the subform and enter 4 records I want the underlying table to reflect Unique ID 106 and Date


Inner join
I have two tables with names and amounts :
Table 1 - contains a whole range of names
Table 2 - contains ONLY some of the names ON TABLE 1

I created an inner join between the names on both of these table as i need the amounts from tble 1 with the names of table 2. Is it possible to also get a list of names and amounts from table 1 which DO NOT APPEAR IN TABLE 2
this was code used to find the similar names on tbl 2 with amounts from tbl1...


inner join question
I have two tables with names and amounts

Table 1 - contains a whole range of names
Table 2 - contains ONLY some of the names ON TABLE 1

I created an inner join between the names on both of these table as I need the amounts from tble 1 with the names of table 2

Is it possible to also get a list of names and amounts from table 1 which DO NOT APPEAR IN TABLE 2

this was code used to find the similar names on tbl 2 with amounts from tbl1

SELECT tbl2name, tbl1Amount
FROM list2 INNER JOIN list1 ON tbl2name = tbl1name;


VBA Question on Comparing fields and updating
I have two tables - first table has a column with file names, a column with file names after being renamed and a status column.

Second table has a column with new file names.

(I have a directory that I renamed each file with a unique name 0000001.tif, 0000002.tif, etc.)

All I need to do is create a button on a form that will look at table 2 and if the file name is there it will update the status column on table 1 (I have all 0's in it and if the file nameon table 2 is there then the status field will change from 0 to 1).


Cannot get values for a Combobox..
I am trying to retrieve the unique names from a table into the combobox on a form. I have the attached code for the command button on the form.

'Invalid use of Null'.

if I use another table for a string value for the same recordset, the code works and the combobox gets populated with the unique names of the field selected.

I tried to retrieve the values for different fields from the table tblPlants, but I get the same error.
It appears that I cannot populate the combobox with any of the field values from the tblPlants. But the values are not Null - by using the code line for the MsgBox (msg), I am able to see the values in the MsgBox.
Or is it some other criteria I am missing?


Running a rport to include a field it shows number not the text in the field
In access 2007 I built a table to include course names and a table for employee names and completion dates. When I try to run a report only the unique id shows on the report not the course name. How can I change the ID to the course name.


VBA Question on Comparing fields and updating
I have a quick question that I need help with. I am a VB.NET programmer and don't know much about VBA.

I have two tables - first table has a column with file names, a column with file names after being renamed and a status column.

Second table has a column with new file names.

(I have a directory that I renamed each file with a unique name 0000001.tif, 0000002.tif, etc.)

All I need to do is create a button on a form that will look at table 2 and if the file name is there it will update the status column on table 1 (I have all 0's in it and if the file name on table 2 is there then the status field will change from 0 to 1).


Analyzing Database
Is there a way to analyze a database i.e. look at field names, table names, form names etc and get a complete list of where the names are used in code as well as in forms, reports and queries. I ask because I need to rename field and table names and need to be able to locate all references to that field, table or query name.


Table Join on Text
I have two tables where the only unique item between the two may be first name and last name. I say "may be" because the tables are from two different sources, and I am trying to find where names from Table A match to names in Table B.

The key to both tables is random sequence assigned by Access.

Table A has 32,678 rows
Key (1,2,3,4,5.)
Last Name
First Name
And lots of other stuff.

Table B has 456 rows
Key (1,2,3,4,5.)
Last Name
First Name

I can't just join on Last Name for obvious reasons. I have tried all combination of joins with varying results; none of which are useful. This should be easy, shouldn't it?


Unique query result issue
I have a query of 11 employees and their pay for jobs done. Only problem is there are 15 completed jobs with some of the employees doing more than one. When I run my query its only displaying unique name results so I'm only getting 11 results of the 15 jobs instead of all 15.

How would I change the query to that the results are only unique employee names


Move column names
I'm using MS Access 2000 and I need to move the column names to the first row of data in a table.
Some of the column names will be longer than 64 characters which is the max for Access.
The table will eventually be exported to excel with a wide and tall first row.(clients request)
I've shortened the names to a 2 digit code that after moved to the first row, will be updated with the longer names.
The table doesn't have static names and will be generated on the fly depending on what parameters the user selects.


Query to return list of field names of a table where data type is Text
Im in a situation where in, I need to write a query to list out all field names/column names against each table based on conditions. I have an access *.mdb file which is having almost 120 tables. I need to prepare a report with all table names and the field names of each table where field is of type text. Im just interested in definition of tables and query.

I can go to design view of each table and list out text field names. But, each table will have atleast 20 fields and it is very laborious to list out all field names from almost 120 tables. To be consice, Im trying something like below.
SELECT [ALL COLUMN_NAMES/FIELD_NAMES] from TABLE_NAME where (data type of FIELD_NAME is Text)


Unique table per record?
Is it possible to have unique tables per record, with it's own data. As of now if open the related table under the persons name I can change the data for him. This however gets copied to every other person in the rest of the table.
So is it possible to have access create a unique table for each person as they are added (table is ready made, no extra info will be added to it, except for the yes/no fields being clicked.).


How to Extract company name with all other info
In Access I have two tables. The first one is records.raw where I have 5,00,000 data with multiple company names.

In another table2 I have only one column with unique company name (49,000).

what I need is that I want the full info of in table2 from records.raw table.

As records raw is consisted of multiple contacts when I am trying to match with company names it is showing me all the companies.

main phone, city, state etc. which are available in records.raw table) from records.raw table?


DISTINCT on a Union All query?
I have a UNION ALL query that pulls Distinct [Name] from 6 different tables and sorts by Name.

When I run the query - there are multiple instances of most names.

Since I need a list that has NO duplicate Names - I did a 'Select Distnict [Name] . . . ' on my Union query & I got my list of Unique Names.

My question is - do I have to do this in two steps like I am - or is there a way for me to make this happen in my original UNION ALL query