View Single Post
  #11  
Old May 22nd, 2008, 07:40 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Check For Existing Record

All arguments to Domain functions need to be strings. Here's a good reference:

http://www.mvps.org/access/general/gen0018.htm

ridgerunner wrote:
I am getting this message "Runtime error 424" "Object Required". The second
and third lines, below, are highlighted in the debug screen.


Private Sub InspDate_BeforeUpdate(Cancel As Integer)

If Not IsNull(DLookup("[NoDuplicates]", (qryFrmAddDMInsp), "[NoDuplicates]="
& frmAddDMInspections![InspDate])) Then
MsgBox "Store and Inspection Date already exist. Please correct",
vbCritical, "Duplicate Entry"
End If
Exit Sub

End Sub

Here is my solution for multiple field duplication. I first join the two
fields in a query. For your example I would do this in a query.

[quoted text clipped - 28 lines]
tia
ridgerunner


--
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