hi,
my user form has 3 text boxes
Text Box 1 = uf_UserInfo.txt_UI_EmpName
Text Box 2 = uf_UserInfo.txt_UI_EmpNameID
Text Box 3 = uf_UserInfo.txt_UI_Dept
If I use the below code then it works fine,
If Trim(uf_UserInfo.txt_UI_EmpName.Value) = "" Then
uf_UserInfo.txt_UI_EmpName.SetFocus
MsgBox "Please enter the Relevent Information and click on Update"
Exit Sub
End If
However; I cannot get 1 or all 3 criteria's to match. If I use the following code then I get an error? I am sure it is to do with 'SetFocus' method.
If Trim(uf_UserInfo.txt_UI_EmpName.Value) Or Trim(uf_UserInfo.txt_UI_EmpNameID.Value ) Or Trim(uf_UserInfo.txt_UI_Dept.Value) = "" Then
uf_UserInfo.txt_UI_EmpName.SetFocus
uf_UserInfo.txt_UI_EmpNameID.SetFocus
Else: uf_UserInfo.txt_UI_Dept.SetFocus
MsgBox "Please enter the Relevent Information and click on Update"
Exit Sub
End If
Please help.
Thanks
R
Bookmarks