Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    The On Current function (2003)

    I have a form that contains a check box control, and I change the caption of a label depending on the check box (IIF, checkbox, label = "abc", label = "def"). I have similar code in the checkbox's After Update event so that the label changes if the checkbox is changed -- that works OK. I have similar code in the form Load event which works upon initially opening the form. I then discovered that when switching to the next record, the On Load event doesn't occur. So I put the same code in the ON Current event which is supposed to be called whenever you switch to the next record. BUT it doesn't!
    Any suggestions as to why the On Current code doesn't work when moving to the next record?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: The On Current function (2003)

    The On Current event does occur each time the form loads a different record. In fact, if you use the On Current event to set the caption of a label depending on the value of a check box, you don't need to use the On Load event, for On Current occurs when the first record is loaded too.

    If the On Current event doesn't work as you expect, there must either be a misunderstanding or something else is interfering. If you can't find out what it is, could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: The On Current function (2003)

    Hi Hans,

    I took your advice and removed the code from On Load and left it in the On Current event. That works. Perhaps the On Load and On Current were conflicting somehow.

    Thanks once again.

Posting Permissions

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