E
Elwin
Use the BeforeUpdate() event of the control to validate it.
Private Sub IPByte3_BeforeUpdate(Cancel As Integer)
Dim Ok As Integer
If Me!IPByte3 = "" Then
Ok = MsgBox("Missing IP byte. Re-enter?", _
vbYesNo + vbExclamation, "Missing Byte")
If Ok = vbYes Then
Cancel = True
Else
cmdClear_Click
End If
End If
End Sub
Use the AfterUpdate() event of the control to set other
values.
Private Sub IPByte3_AfterUpdate()
IPRange.Value = IPRange.Value & IPByte3.Value & "."
End Sub
I don't know what the cmdClear_Click event is doing, so
you may need to call it from somewhere else if it alters
the contents of the IPByte3 control in any way. I'm
hoping that cancelling the BeforeUpdate event will
eliminate the need to call it. Good luck.
Private Sub IPByte3_BeforeUpdate(Cancel As Integer)
Dim Ok As Integer
If Me!IPByte3 = "" Then
Ok = MsgBox("Missing IP byte. Re-enter?", _
vbYesNo + vbExclamation, "Missing Byte")
If Ok = vbYes Then
Cancel = True
Else
cmdClear_Click
End If
End If
End Sub
Use the AfterUpdate() event of the control to set other
values.
Private Sub IPByte3_AfterUpdate()
IPRange.Value = IPRange.Value & IPByte3.Value & "."
End Sub
I don't know what the cmdClear_Click event is doing, so
you may need to call it from somewhere else if it alters
the contents of the IPByte3 control in any way. I'm
hoping that cancelling the BeforeUpdate event will
eliminate the need to call it. Good luck.