Re: acc97, control.undo not restoring old value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith Wilby

    Re: acc97, control.undo not restoring old value

    "Phil Stanton" <phil@myfamilyn ame.co.ukwrote in message
    news:OcidndqaHO hrKkfVnZ2dnUVZ8 uidnZ2d@posted. plusnet...
    You might try
    >
    Private Sub MyControl_Befor eUpdate(Cancel As Integer)
    >
    If Nz(MyControl) = "" Then
    MsgBox "Someting required"
    Cancel = True
    SendKeys "{ESC}"
    End If
    >
    End Sub
    >
    AIUI the SendKeys method is frowned upon because it can send to whatever
    window has the focus, be it your Access application or anything else.

    Keith.

  • Salad

    #2
    Re: acc97, control.undo not restoring old value

    Keith Wilby wrote:
    "Phil Stanton" <phil@myfamilyn ame.co.ukwrote in message
    news:OcidndqaHO hrKkfVnZ2dnUVZ8 uidnZ2d@posted. plusnet...
    >
    >You might try
    >>
    >Private Sub MyControl_Befor eUpdate(Cancel As Integer)
    >>
    > If Nz(MyControl) = "" Then
    > MsgBox "Someting required"
    > Cancel = True
    > SendKeys "{ESC}"
    > End If
    >>
    >End Sub
    >>
    >
    AIUI the SendKeys method is frowned upon because it can send to whatever
    window has the focus, be it your Access application or anything else.
    >
    Keith.
    That may be true. But if your form has focus, and the app is Access,
    and you are doing a Sendkeys, how could it be sending the Sendkeys value
    to any other window?

    Comment

    • Keith Wilby

      #3
      Re: acc97, control.undo not restoring old value

      "Salad" <oil@vinegar.co mwrote in message
      news:wZGdnc0bxZ TRBkbVnZ2dnUVZ_ q_inZ2d@earthli nk.com...
      >
      That may be true. But if your form has focus, and the app is Access, and
      you are doing a Sendkeys, how could it be sending the Sendkeys value to
      any other window?
      Supposing you have a long procedure in your app and your user clicks on
      another window whilst it runs. What would the SendKeys method do then?

      Comment

      Working...