now i got 3 jobs that is engineer,trainee,cleck . For engineer, the salary must >=30000 and <=40000. For trainee, the salary must >=20000 and <=30000. For engineer, the salary must >=0 and <=20000. And i am trying to set the validation rules for it and it seems it cant work, can any one help me out? I just need someone to guild me for the first data validation for Job "engineer".
The code is at below:
-------------------------------------------------------------------
Private Sub Salary_AfterUpdate()
If (Me.job="engineer" And (Me.Salary >= 30000 And Me.Salary <= 40000)) Then
'allow the input
Else
Msgbox("your salary key in wrongly")
'Request to key in again ( I dont know want to use what code)
End If
End Sub
-----------------------------------------------------------------------
Can anyone Correct me?
The code is at below:
-------------------------------------------------------------------
Private Sub Salary_AfterUpdate()
If (Me.job="engineer" And (Me.Salary >= 30000 And Me.Salary <= 40000)) Then
'allow the input
Else
Msgbox("your salary key in wrongly")
'Request to key in again ( I dont know want to use what code)
End If
End Sub
-----------------------------------------------------------------------
Can anyone Correct me?