473,320 Members | 1,853 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,320 software developers and data experts.

how to compare a value to all other values in the same field

I am an access newbie but i have been searching and can't seem to find a good way to identify values in a single field that are repeated.

my field is [VIN] and i tried using the expression iif([VIN] = [VIN],"Duplicate", "Unique")

however this returns every record as a duplicate...

if i can pull this off i then wanted to add in the field [Program] to find records in which the [VIN] and [Program] value are the same....

any help would be appreciated:

example

VIN Program
123456 100
123456 100
122222 200
122222 300
133333 400
144444 400

so
my expression in the querry would result in only the first two records being displayed
VIN Program
123456 100
Jul 10 '07 #1
4 1550
nico5038
3,080 Expert 2GB
Not sure what you want to achieve.
When you just want to identify the duplicates you should create a groupby query with the ID and Value field. Just place them in the graphical query editor and press the "E" looking button. An additional row will appear underneath the fields with "GroupBy". Now add the ID again and change the "GroupBy" into "Count".
This field will tell how many rows with the same two values appear and by giving the criteria: >1 you'll find the dupes.

Does that help, or do you need something else?

Nic;o)
Jul 10 '07 #2
see belllow for the answer
Jul 10 '07 #3
YOU ARE THE MAN!....and i feel like an idiot.....i used the wizard and pulled it off perfectly just as you said (but it wasn't so clear to me)

i looked at the expression the wizard created to accomplish this and it follows:



In (SELECT [VIN] FROM [clms_mpbtt_d0701] As Tmp GROUP BY [VIN],[Program Number] HAVING Count(*)>1 And [Program Number] = [clms_mpbtt_d0701].[Program Number])
Jul 10 '07 #4
nico5038
3,080 Expert 2GB
Glad I could help, have felt myself "stupid" many times in the past, but it did teach me a lot of valuable lessons <LOL>

Success with your application !

Nic;o)
Jul 10 '07 #5

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

Similar topics

1
by: Neil | last post by:
Folks, I've got a problem at work, and I'm hoping that someone out there may have had something similar (although I doubt it!) or may be able to offer some advice. I'm in the process of...
8
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
11
by: Russ Green | last post by:
How does this: public TimeSpan Timeout { get { return timeout; } set { timeout = value; if(timeout < licenseTimeout) licenseTimeout = timeout; }
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
21
by: vadymus | last post by:
Hello, I need to compare 2 id names but not their values. For example: document.getElementById(i) == document.getElementById(j) these elements above seem to give error or do not work. My...
1
by: The Rookie | last post by:
Hi everybody, The rookie is back... Ok I'm working actually on a lot of differents financial excel tables (some with calculation'macro) and most of the time I need to check manually if every...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
11
by: Marshall Dudley | last post by:
I am comparing two numbers, and the comparison gives absolutely bizzare results. I am comparing 5 with a number that is entered in a form. Then if the number entered is 5, or between 50 and 95, it...
6
by: napatel04 | last post by:
Hi everyone, I would like to know if there is a quick query someone can help me write for the following scenario. I think I can do this with VBA but since this is suppose to be a temp. solution,...
1
by: mesut | last post by:
Hi colleagues, In fact I don't have a problem but just don't know which way is good and better. I need some advice which programming way I shall use. Since a couple of days I'm investing my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.