Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Text Box AfterUpdate Event Procedure


Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2007, 04:25 PM
bobski bobski is offline
Newcomer
 
Join Date: Aug 2006
Posts: 5
Default Text Box AfterUpdate Event Procedure


I have a text box on a form called "Field1". After I enter the entire character string in Field1 and press the enter key, I would like to perform an afterupdate event procedure equivalent to the afterupdate event procedure that is available in Microsoft Access for text fields. Something like:

Sub Field1_AfterUpdate()

MsgBox "Field1 = " & Field1

End Sub

Does anyone have a procedure page that mimics the event procedures available in Microsoft Access for text box objects. Example: beforeupdate, afterupdate, on enter, etc..

Does anyone know how I might create an event procedure that is equivalent to Microsoft Access event procedure : afterupdate
Reply With Quote
  #2  
Old 03-09-2007, 04:40 PM
Roger_Wgnr's Avatar
Roger_Wgnr Roger_Wgnr is offline
CodeASaurus Hex

Forum Leader
* Expert *
 
Join Date: Jul 2006
Location: San Antonio TX
Posts: 2,427
Default

Check for the Enter key in the KeyUp event and then call a your sub something like this.
Code:
Private Sub Field1_KeyUp(KeyCode As Integer, Shift As Integer) 'Check to see if the Enter Key was pressed. If KeyCode = 13 Then Field1_AfterUpdate End if End Sub Private Sub Field1_AfterUpdate() MsgBox "Field1 = " & Field1.Text End Sub
__________________
Code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ~Martin Golding
The user is a peripheral that types when you issue a read request. ~Peter Williams
MSDN Visual Basic .NET General FAQ
Reply With Quote
  #3  
Old 03-09-2007, 06:53 PM
bobski bobski is offline
Newcomer
 
Join Date: Aug 2006
Posts: 5
Default

Thank you very much. It is really appreciated!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->