Results 1 to 2 of 2

Thread: event before textchange

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    Thailand
    Posts
    13

    Smile event before textchange

    Have any event before textchange.Can I check all object change in form such as form change event.
    For Example I want to save old record before I add new record
    and If I didn't change anything in old record ,I won't save anything.But If I changed any columns,I will save it old data.
    I use textbox for first column.Do you have any way to resolve it.Thank a lot.
    www_vb_ok

  2. #2
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394
    the Leave event is probably a better place to do this, but, why not have a modular level variable that saves the old value,

    ie

    VB Code:
    1. Private mstrSaveText as String
    2. ...
    3.  
    4. 'In the Text Leave Event
    5.  
    6. if mstrSaveText <> txtText.Text then
    7.   'do something with the Saved Text
    8.   'do something else with the New Text
    9. end if
    10. mstrSaveText = txtText.Text

Posting Permissions

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



Click Here to Expand Forum to Full Width