Results 1 to 4 of 4
  1. #1
    danielhowden is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    2

    Trying to fire event on record change

    I have a small database that had a field of "Yes/No" as a check box. What I want to do id fore an event depending on whether this check box is ticked or not.



    I notice that there is not a "On_Change" event for this control and I cannot find a way to detect that the next or different record if being viewed.

    Cheers Dan.

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,035
    Hi,

    every checkbox has a BeforeUpdate and AfterUpdate event. Try using these.

    grNG

  3. #3
    danielhowden is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    2
    No, that doesn't work, I just tried it. I set a MsgBox to display on both BeforeUpdate and AfterUpdate and flicking throught records it didn't fire either.

  4. #4
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,035
    Hi,

    beforeupdate and afterupdate get fired when you change the data in the checkbox, if you just tab across the controls without changing them you have on the control level the events OnEnter/onGotFocus or onexit/onlostfocus. At the record level you need the OnCurrent event.

    grNG

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  2. Using an event to change color of text.
    By michaeljohnh in forum Programming
    Replies: 3
    Last Post: 08-30-2010, 12:30 PM
  3. when does an msquery fire
    By jonny dexter in forum Queries
    Replies: 0
    Last Post: 08-25-2010, 11:43 AM
  4. Replies: 3
    Last Post: 02-19-2010, 04:19 PM
  5. Replies: 3
    Last Post: 10-18-2009, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums