Hi TJ,
Bear with me as I try to understand your query.
I am going to assume that you have a table containing information on
individuals.
In this table, there is column called SSN that will store the social
security numbers.
I am also assuming that you have a form that you will use to input in
information on these individuals. In this form what you would like to do is
have the system prompt upon clicking on the "submit" button, whether there is
a duplicate SSN already used by another individual. And then you will pull
out the information pertaining to the existing SSN that is "duplicated" to
verify whether it is really duplicated.
My suggestion to you therefore is include in the command button code a check
to see whether firstly the SSN exists. If it does, to raise a msgbox to
inform you and then open up another form to display information on that
individual for verification.
If my understanding is correct and you need the code to do that, let me know.
Michael
tjv1960 said:
Hi Michael,
What I have is a database that contains information on individuals. In
excel I was able to create a condition which turned SSNs a different color if
they previously existed. From that I was able to compare info on that
individual and make sure the info was not a duplicate, but I need to compare
that info with another field. I need to use access because I've maxed out
excel, so I need an alternative. I need to cut and paste new info daily.
--
TJ
:
Hi.
Do the duplicated records need to be displayed together with those that are
not duplicated. The reason for asking is because you can always run a query
to determine the duplicated records and you can then link the query to a
listbox control to display the records on a form for example.
How you do it is by creating a query with the social security number in the
first column and then an expression on the second column where the function
is count([social security field name]). Make sure you group the first column
and the second olumn is set to Expression.
Let me know if you need more info.
Michael
:
I have a list of social security numbers and I want those that appear more
than once a difference color. Currently, I use conditional formatting in
Excel, but the expression does not work in access. fCheckDuplicates[SSN]
expression is not working. Can someone assist me.