Results 1 to 2 of 2

Thread: Events ??

  1. #1
    Join Date
    Dec 2000
    Thanked 0 Times in 0 Posts

    Events ??

    Please pardon the double post. This question has also been posted in the Access Forum.
    __________________________________________________ __________

    I am a real VBA newbie! I am writing a small application containing several tables and forms. For one form in particular, I want to prevent the creation of duplicate records. I have coded a dlookup command in the "Before Update" event for a combo box control. This is working correctly. My problem is that even though I am setting cancel = -1 when I detect that a record has been found via the dlookup, I can't seem to cancel the insertion of the record.

    Can anyone point me in the direction of a good web resource that discusses all VBA events and the order in which they are triggered? I really need to read up on this to understand fully. Any suggestions to cancel the insertion of the duplicate record would also be greatly appreciated.

    Thanks, in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Events ??

    I posted a <A target="_blank" HREF= w=collapsed&sb=5>reply</A> in the Access forum, so I'm locking this thread in VB/VBA.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts