Help with Data Entery

Ok I tried that I am getting an error. I am getting an error if I put salary or txtsalary ot Text43.

Private Sub Form_Current()
If Me.NewRecord Then
Me.salary = [tblEmployees].[Annualsalary]
End If

End Sub
 
Is Text43 the name of the control with Salary and the ControlSource? If so then change the code to:
Code:
Private Sub Form_Current()

   If Me.NewRecord Then
      MsgBox "Current salary should be [" & [Annualsalary] & "]"
      Me.Text43 = [Annualsalary]
   End If

End Sub
What error are you getting?
 
now I am getting a run error 2465 on the this line

MsgBox "Current salary should be [" & [Annualsalary] & "]"
 
Change both of them to [tblEmployees].[Annualsalary] and try it again.
 
I am attaching my database for your review. please look at tblEmloyee_read_data_etnery form
 
I am going to email you my database. I hope you don't mind
 
thank you very much for emailing me the db. A few issues number one when I refresh tblemployees with new data by importing data from excel into this table the changes doesn't work. Second I am sorry that I didn't tell you I don't want to ues query payment for this form I wanted to use quryentery to create the sub form to update the tblemployeepayment_sched. can you advice.
 
I'm uploading your db so others can look at it and possibly offer additional suggestions.
 

Attachments

Users who are viewing this thread

Back
Top Bottom