MS_Access_Amature
Registered User.
- Local time
- Yesterday, 23:52
- Joined
- Nov 10, 2010
- Messages
- 56
The user can't press tab until he types something into the textbox..how do I do this??
This is what i have..
What do I need to fix and in what event do i need to put this??
This is what i have..
Code:
Private Sub CompanyName_KeyPress(KeyAscii As Integer)
On Error GoTo MyErrorControl
If KeyCode = 9 and Me![CompanyName].Value = "" Then
KeyCode = 0
[INDENT]msgbox "Please enter a Company Name"[/INDENT]
End If
Exit Sub
MyErrorControl:
Select Case Err.Number
Case 0
Resume Next
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical, "CompanyName_KeyPress ERROR"
Resume Next
End Select
End Sub
What do I need to fix and in what event do i need to put this??