View Single Post
  #5  
Old April 30th, 2010, 05:02 PM posted to microsoft.public.access.gettingstarted
Kathryn
external usenet poster
 
Posts: 108
Default Flickering Error message: Check duplicates

Hi

I am using Access 2007 and, as far as I'm aware, everything is up to date.
The database includes a Contacts table from which there is a Query: Contacts
Extended... SQL of which is:
SELECT
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[Company],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])) AS [File As],
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[Company],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName]
& " " & [LastName])) AS [Contact Name], Contacts.*
FROM Contacts
ORDER BY
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[Company],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])),
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[Company],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName] & " " & [LastName]));

This is useful as it has all sorts of built in SmartTags associated with it
(Schedule meeting/ send e-mail, etc) - but I could probably just use the
Contacts Table if that will make life easier.

The Form causing the problems has as its RecordSource the Contacts Extended
query. I'm not sure why that and not the Contacts Table - again, it may be
easier to use the Contacts Table. If I did that, would it be possible to
change the "Check Duplicates" warning to match?

The Expression Builder currently reads:
=IIf(DCount("*","[Contacts Extended]","[ID]" & Nz([ContactID],0) & " And
[Contact Name] = '" & Replace(Nz([Contact Name]),"'","''") & "'")0,"Possible
Duplicate","")

I hope that's more help!

Many thanks


"ruralguy via AccessMonster.com" wrote:

Without looking at the actual database, I can only ask rather generic
questions. What version of Access are you using? Are all of the Service Packs
and HotFixes applied?

Kathryn wrote:
Hi - sorry for the delay in getting back to you - it's been a bit manic with
the other side of my work this week!

To answer the question - no, I didn't put the code in. I used the Contacts
Management template as the basis of our own and up until last week it worked
fine. To be honest, I hadn't checked what code was there as I'm so new I
wouldn't have known how to! I've learnt a lot but can't say whether it
changed from one day - when it worked - to the next when it didn't

Not much help I know but hopefully you can prompt what other information you
might need.

Many thanks

Hi Kathryn,
Did you put that code in the ControlSource of the TextBox?

[quoted text clipped - 22 lines]

Many thanks


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

.