Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi there, forum.

    On one of my forms is a combo box called Status. If Status = Sent for Review then a particular button on the form appears, otherwise it is not visible.

    The button (sentforreviewtxt) is set to Visible = No
    The code is in the onChange event of the Status field:

    If Me.Status = "Sent for Review" Then
    Me.sentforreviewtxt.Visible = True

    This works well when I select Sent for Review from the list with the mouse. However, if I start typing "Sen", Sent for Review appears and I hit Enter or Tab to select it and move to the next field, the button that is supposed to appear does not appear.

    Why should there be a difference whether I select the status with a mouse or type it in?

    Thanks,

    JoeK

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    The usual event to use for this purpose is the After Update event. The change event occurs at every single keystroke, rather than when you have finished with netering something.

    I am not sure just why you get the behaviour you describe, but if you move the code to AfterUpdate it should do what you want.
    Regards
    John



Posting Permissions

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