Help with conditional statement

mhk

Registered User.
Local time
Today, 11:40
Joined
Aug 5, 2008
Messages
14
This is basically what I'm trying to do.

if RecordID does not exist in TableA, I want to run a save process and then continue on with my code.

If RecordID does exist in TableA, I want to skip the save process and continue on to my code.

This seams to be a pretty simple If..Then..Else statement, but I can't figure out how to compare the RecordID in my form to the RecordID in a different table.

Thanks for any help you can give.

Thanks
MK
 
MK,

Code:
If DCount("[RecordID]", "TableA", "[RecordID] = " & Me.RecordID) = 0 Then
   'Save Process
   ' Maybe add [B]Exit Sub [/B]if you don't want to run the following code
End If
'
' Rest of code ...
'

Wayne
 
Thanks WayneRyan...It looks like that worked perfectly.

MK
 

Users who are viewing this thread

Back
Top Bottom