Text Box AfterUpdate Event Procedure

bobski
03-09-2007, 05:25 PM
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

Roger_Wgnr
03-09-2007, 05:40 PM
Check for the Enter key in the KeyUp event and then call a your sub something like this.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

bobski
03-09-2007, 07:53 PM
Thank you very much. It is really appreciated!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum