Hai,
I have a query regarding MS-Access Forms,
I am coding my access form wherein i got to check that the textbox shouldn't be empty when its relevant text box is entered with some value.
if it is empty, the control must be focused back to it.
the code i have written is,
Private Sub Type_of_Transfer_LostFocus()
If Type_of_Transfer.Text = "" And Transfer.Enabled = True Then
Type_of_Transfer.SetFocus
MsgBox ("Select the type of transfer from the list")
Else
add.SetFocus
End If
End Sub
Please help me out in validating this perfectly.
I have a query regarding MS-Access Forms,
I am coding my access form wherein i got to check that the textbox shouldn't be empty when its relevant text box is entered with some value.
if it is empty, the control must be focused back to it.
the code i have written is,
Private Sub Type_of_Transfer_LostFocus()
If Type_of_Transfer.Text = "" And Transfer.Enabled = True Then
Type_of_Transfer.SetFocus
MsgBox ("Select the type of transfer from the list")
Else
add.SetFocus
End If
End Sub
Please help me out in validating this perfectly.