CompAnalyst
Programmer
Alrighty... i used to use this method when we had Access 97 and now i can't find the solution in 2000 + XP. Basically what i am trying to do is when a user enters an employee ID in the form, it runs an update query which grabs other employee data from a different table and updates the fields in the form. The reason for this is that employee data changes from time to time and we need to maintain a historical record of information at the time that the information was input. (Don't ask, Human Resources is very silly)
SO... here is my code so far... and it doesn't want to cooperate. I am pulling my hair out. Sigh
Private Sub EmplID_AfterUpdate()
Dim db As DAO.Database
Dim qry As DAO.QueryDef
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Set db = CurrentDb()
Set qry = db.QueryDefs("qryUpdateEEReclass")
qry.Parameters("intEmplID") = Me.EmplID
qry.Execute dbFailOnError !!!! I get the error here !!!!
qry.Close
Set qry = Nothing
Me.Refresh
End Sub
Please help! Thanks!
Rachel, Compensation Analyst
SO... here is my code so far... and it doesn't want to cooperate. I am pulling my hair out. Sigh
Private Sub EmplID_AfterUpdate()
Dim db As DAO.Database
Dim qry As DAO.QueryDef
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Set db = CurrentDb()
Set qry = db.QueryDefs("qryUpdateEEReclass")
qry.Parameters("intEmplID") = Me.EmplID
qry.Execute dbFailOnError !!!! I get the error here !!!!
qry.Close
Set qry = Nothing
Me.Refresh
End Sub
Please help! Thanks!
Rachel, Compensation Analyst