Topics Search

Unique Names in Table

Unique Names in Table
Views: 0
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:

Similar posts...

 

Unique Values via .rowsource

Unique Values via .rowsource Icon
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.
 

inner join question

inner join question Icon
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;
 

Cannot get values for a Combobox..

Cannot get values for a Combobox.. Icon
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

Running a rport to include a field it shows number not the text in the field Icon
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.
 

Move column names

Move column names Icon
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.
 

How to Extract company name with all other info

How to Extract company name with all other info Icon
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?
 

Finding items in Table 1 that aren't in Table 2

Finding items in Table 1 that aren't in Table 2 Icon
I have two lists of names, one a superset of the other. Is it possible in Access 2007 to find the names in the larger table that are NOT in the smaller table? How does one do such a thing?
 

Lookup for a field using only unique values.

Lookup for a field using only unique values. Icon
How can I set a field in a table as a lookup, but only get the unique values from the table that is being looked up?

For instance say I have a table that consists of three fields, A, B and C as below.

Table 1:

A B C
1 2 3
1 1 1
1 2 2

Now, say I create a new table with fields called X and Y, as below.

Table 2:
X Y

What I want to know is this:
If I make the X field in Table 2 a lookup of the B field in Table 1, how can I make the lookup return only the unique records in this field?
(I.e. The lookup in the X field of Table 2 would only show (2,1) and not (2,1,2).
 

Multivalue List

Multivalue List Icon
I created a multivalue list in my table. It contains a list of names and a checkbox. I designed the form based on this and am able to check off multiple names. When I go back to look at the table, it stores in each name separated by a comma. So far so good.

When I create a report to display the data, it displays it as 1,2,3.etc., instead of the names separated by a comma.

What do I need to do to display the names
 

Dots and Exclamation Marks Usage with Objects in VBA3

Dots and Exclamation Marks Usage with Objects in VBA3 Icon
MS-Access Application Objects (Table, Query, Forms, Text box, Label etc.) needs some meaningful names, when we create them. If we don’t, then MS-Access assigns default names, like Form1, Form2, Text1, Label1 and so on. These default names doesn’t give any clue as what those names represents. We are free to assign appropriate names in relation to what we are building in the Database.