I hate to butt in as
well, but didn’t we go through this about 6 months ago. Another option was to
use a combo box linked to the last name field, which allows you to type in an
name and if the name is already in the table it will auto fill in the rest, and
add a not in list code to add new clients.
Carl
From:
[email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Tom Oakes
Sent: Friday, September 30, 2005 9:25
PM
To:
[email protected]
Subject: RE: [AccessDevelopers] Re: Getting
Duplicate Records
Yes - more work, but
more elegant in my opinion. The AfterUpdate occurs after the problem (the
duplicate entry) has already occurred.
Then you give them
the option to delete it if it's a duplicate, I'd assume - which seems a little
silly to me.
Tom
Oakes
Personal PC Consultants, Inc.
[EMAIL PROTECTED]
503.230.0911 (O)
402.968.6946 (C)
734.264.0911 (F)
From:
[email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Robin
Sent: Friday, September 30, 2005 4:57
PM
To:
[email protected]
Subject: [AccessDevelopers] Re: Getting
Duplicate Records
Hi Guys,
Scuse me for butting in, but this seems like a lot of trouble
to go
to to avoid using
DLookup.
If you do a lookup in
the after update event on FirstName and
LastName and a message or other aproprate action if found
(like
loading the record) it's only
a coupla lines of code.
Regards
Robin.
--- In [email protected], "Crosier, Dawn"
<[EMAIL PROTECTED]>
wrote:
> Thanks Tom - This will
be easier to implement than I thought it
would,
>
basically I will force the search first and then allow them to add
if no
> records are found. I already had a search form /
process in
place,
I'll
> just reverse when things
are done.
>
> Sometimes you just need
someone else's "eyes" on a problem!
Especially
>
when you are a one person development "team".
>
>
Have a good weekend!
>
> Dawn
Crosier
> Application
Specialist
> "Education Lasts a
Lifetime"
>
> This message was posted to a
newsgroup. Please post replies and
> questions to the group so that others can learn as
well.
>
>
>
________________________________
>
> From:
[email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of
Tom Oakes
> Sent: Friday,
September 30, 2005 4:21 PM
> To:
[email protected]
> Subject: RE: [AccessDevelopers] Getting Duplicate
Records
>
>
> You can't reasonably expect to be able to index the
first & last
names,
>
so...
>
> I would create a unbound,
pop-up form that is the first step in
entering
> a
new client. Change the "Allow Additions" property on your main
client
> form to disallow the "native" addition of a new
record.
>
> Your pop-up would have
textboxes for first/last/title, at least.
Add a
> "Save"
button and a "Cancel" button. The "Save" button does this:
>
> 1) Searches the client table
for matches on these fields.
> 2) Warns if found - maybe have a listbox on this form
that shows
> duplicates with a
bit more info (address, phone, etc) that enables
them
> to
determine whether the client actually exists in the db already,
or
> whether the match is coincidence.
> 3) Give the user the choice to
add the record, or jump to the
existing
>
record.
>
> I do this sort of thing quite
a bit to enforce relational integrity
> that's a little to complicated to do with indices,
etc.
>
> Hope that
helps.
>
> Tom Oakes
> Personal PC Consultants, Inc.
> [EMAIL PROTECTED]
> 503.230.0911 (O)
> 402.968.6946 (C)
> 734.264.0911
(F)