Results 1 to 2 of 2

Thread: Events ??

  1. #1
    Lounger
    Join Date
    Dec 2000
    Posts
    45
    Thanks
    0
    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
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Events ??

    I posted a <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=acc&Number=16694&page=0&vie w=collapsed&sb=5>reply</A> in the Access forum, so I'm locking this thread in VB/VBA.
    Charlotte

Posting Permissions

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