B
Bauji
I am using following coding in text30_lostfocus, but I am unable to handle it. My condition is not working properly. What ever I enter in Text30, if it is null, it should give the mesagebox and return back to same textbox other wise go to next control
I tried in various following event, but not able to make it workable.
*------Lost Focus Event--------------------------------------------------------------------------------*
If Text41="" Then
MsgBox "The Please enter name"
Me.Text30 = 0
Me.Text30.setfocus
End If
*-----------------------------------------------------------------------------------------------------*
*------On Exit Event--------------------------------------------------------------------------------*
If Text41="" Then
MsgBox "The Please enter name"
Me.Text30 = 0
Docmd.CancelEvent
Me.Text30.setfocus
End If
*-----------------------------------------------------------------------------------------------------*
*------Before Update Event-----------------------------------------------------------------------------*
If Text41="" Then
MsgBox "The Please enter name"
Me.Text30 = 0
Docmd.CancelEvent
Me.Text30.setfocus
End If
*-----------------------------------------------------------------------------------------------------*
I dont know what is wrong I am doing here, Please help me. I am stuck here.
I tried in various following event, but not able to make it workable.
*------Lost Focus Event--------------------------------------------------------------------------------*
If Text41="" Then
MsgBox "The Please enter name"
Me.Text30 = 0
Me.Text30.setfocus
End If
*-----------------------------------------------------------------------------------------------------*
*------On Exit Event--------------------------------------------------------------------------------*
If Text41="" Then
MsgBox "The Please enter name"
Me.Text30 = 0
Docmd.CancelEvent
Me.Text30.setfocus
End If
*-----------------------------------------------------------------------------------------------------*
*------Before Update Event-----------------------------------------------------------------------------*
If Text41="" Then
MsgBox "The Please enter name"
Me.Text30 = 0
Docmd.CancelEvent
Me.Text30.setfocus
End If
*-----------------------------------------------------------------------------------------------------*
I dont know what is wrong I am doing here, Please help me. I am stuck here.