I am brand new to Visual Basic 6 and have no chance of upgrading to a newer platform. We need to make a couple changes to an existing program.
I have a form (Form1) with 3 textboxes. I need to save each textbox value after the user fills them in.
After the user presses the Enter key, the value for that box should be saved and later tested for empty values from a single function/Sub.
Here is what I have so far:
Private Sub empId_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Dim empId As String
empId = Form1.empId.Text 'Save this for a later test
End If
End Sub
Private Sub orderNo_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Dim orderNo As String
orderNo = Form1.orderNo.Text 'Save this for a later test
End If
End Sub
Private Sub partNo_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Dim partNo As String
partNo = Form1.partNo.Text 'Save this for a later test
End If
End Sub
After all the variables have been set, I would like to do something similar to:
if(!empId || !orderNo || !partNo) {
// show error
} else{
// process the data
}
Can someone show me how this should be done?