I have a Database that is being used to calculate work on a Project
Each user completes a Form on the Database with his or her hours, but as each user has a set rate per hour, I would like this recorded for the job (this amount changes each year, so it can't be calculated on the fly with an expression. The value needs to be stored for the date it was done ).
There are about a dozen users, and each user has a different rate per hour.
I thought that the best way to capture this would be with an On Load Event.
I was going to use a Select Case statement, like this:
Code: Select all
Private Sub Form_Load()
Select Case StaffName
Case Joe.Bloggs
Me.StaffRate = 80
Case John.Smith
Me.StaffRate = 90
End Select
End Sub
Code: Select all
Private Sub Form_Load()
Select Case StaffName
Case Me.StaffName = Joe.Bloggs
Me.StaffRate = 80
Case Me.StaffName = John.Smith
Me.StaffRate = 90
End Select
End Sub
I'm not really familiar with building Case Statements (obviously), so any advice regarding the (wrong) way I'm structuring it would be greatly appreciated.
P.S. This is the way it seemed to be structured when I Googled it, but I guess I'm missing something. :(
Many thanks for any help in fixing my code.