A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Check For Existing Record



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.