> Ok, I got it to work. Here's the revised code.....
>
[quoted text clipped - 19 lines]
> Resume Exit_AddNewRcd_Click
> End Sub

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
>> Ok, I got it to work. Here's the revised code.....
>>
[quoted text clipped - 29 lines]
>
> Delete the "DoCmd.CancelEvent" line, since it's not doing anything.
Isn't it the Cancel = True that he should delete? It's not like this is a
BeforeUpdate event, where setting Cancel = True will undo the update. (For
that matter, I have to assume that he's either declared Cancel as a
module-level variable, or else he's running without Option Explicit turned
on, since Cancel isn't declared anywhere in the module)

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
Dirk Goldgar - 13 Apr 2005 21:42 GMT
>> Delete the "DoCmd.CancelEvent" line, since it's not doing anything.
>
[quoted text clipped - 4 lines]
> Option Explicit turned on, since Cancel isn't declared anywhere in
> the module)
Duh. You're right, of course. Probably neither of those "cancel"
statements accomplishes anything.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Steve Norris - 13 Apr 2005 22:06 GMT
You are both correct. I removed both cancels from my routine and it still
works.
Thanks a bunch for a better understanding of the option explicit too!
Steve