O
Oz Skull
G'day ppl,
I am looking for a code that will lookup a string value before it updates
the field eg.
= DLookup("txtMyTitles", "tblMyTitles", "Criteria = '" &
forms!frmMyTitlesInput!txtMyTitles & "'")
If Me.txtMyTitles = ("txtMyTitles", "tblMyTitles") Then
response = msgBox("Title already Exists", vbOk)
DoCmd.Cancel
Else
Me.txtMyTitles.Update
End If
Effectively, I want to check the table for the value I enter to see if it is
already there, if so, then cancel the event.
Now I know the Syntax structure is all wrong, but it is the best was I can
explain what I am trying to achieve.
Look forward to your thoughts
TIA
Mark.
I am looking for a code that will lookup a string value before it updates
the field eg.
= DLookup("txtMyTitles", "tblMyTitles", "Criteria = '" &
forms!frmMyTitlesInput!txtMyTitles & "'")
If Me.txtMyTitles = ("txtMyTitles", "tblMyTitles") Then
response = msgBox("Title already Exists", vbOk)
DoCmd.Cancel
Else
Me.txtMyTitles.Update
End If
Effectively, I want to check the table for the value I enter to see if it is
already there, if so, then cancel the event.
Now I know the Syntax structure is all wrong, but it is the best was I can
explain what I am trying to achieve.
Look forward to your thoughts
TIA
Mark.