Re: Duplicate Record Warnings
From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 11/05/04
- Next message: Michel Walsh: "Re: multiple table creation in Access"
- Previous message: Allen Browne: "Re: Confusing error message - Null Value (Access 2000)"
- In reply to: RAO: "RE: Duplicate Record Warnings"
- Next in thread: RAO: "Re: Duplicate Record Warnings"
- Reply: RAO: "Re: Duplicate Record Warnings"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Nov 2004 08:06:10 -0500
Hi,
Should be
Dcount("*","tblFINSPECTcustspec", "ITEM=""" & Me.ITEM & """" )
be sure to add a space after Item and before &.
At then end of the table name, use " not : (an original typo in my
reply).
Hoping it may help,
Vanderghast, Access MVP
"RAO" <RAO@discussions.microsoft.com> wrote in message
news:3E902AFD-1890-449A-BBF4-D93348942881@microsoft.com...
> Hello,
> I have tried the code from Michel and got an error message: Expected list
> separator or ).
> If 0 <> Dcount("*","tblFINSPECTcustspec:,ITEM=""& Me.ITEM&"""")
> Any ideas what I have wrong?
> Thanks,
>
>
> "Dustin Ventin" wrote:
>
>> I have a field in my Access database that I do not want duplicated, so I
>> set
>> it in the table properties not to allow duplicates. It works great for
>> not
>> allowing duplicate records.
>>
>> The problem is that the form people access this table through does not
>> warn
>> them when they have duplicated the project number. It is a
>> additions-only
>> form designed for the entry of a single record of entry, and then the
>> user
>> presses 'done'. If the field in question is a duplicate, the form just
>> closes like normal, but doesn't insert the record. No warning, no
>> nothing.
>> It's as if the OnError event isn't firing.
>>
>> I have been using the docmd.setwarnings(false) command in VBA in certain
>> places, but I put docmd.setwarnings(true) directly above the exit
>> command,
>> and still no warning. Why are no warning messages showing up?
>>
>> Any ideas?
>>
>> Dustin Ventin
- Next message: Michel Walsh: "Re: multiple table creation in Access"
- Previous message: Allen Browne: "Re: Confusing error message - Null Value (Access 2000)"
- In reply to: RAO: "RE: Duplicate Record Warnings"
- Next in thread: RAO: "Re: Duplicate Record Warnings"
- Reply: RAO: "Re: Duplicate Record Warnings"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|