Hi
I was hoping someone could possibly assist.
I have Two Tables
TblIntrvCandidates & TblEmpInfo.
In the "TbleIntrvCandidates" we have hundred of records of candidates being interviewed and using it for sending document etc. Once a candidates interview was not successfull or experience was not enough, the record status would be set to Inactive and that is the end untill next time they apply for something.
However once the cadidate is being made an offer i would like to move all the fields for that record we have to our "TblEmpInfo" Table.
All the Reocrds in the "TblIntrvCandidates" are in the "TblEmpInfo" Table. (But not vice versa)
(I know it is best to make use of status changes in on table and run queries, but we do not want to keep records of just interviewed candidates with permanent employees.
So i would like to create an after update statement, that when the users status is changed to "offer" made and append to the "empinfo" table swill run and a delete within the interview table on the current record.
I would like to make use of an append query, or a select * to not having to redefine the record names because i am sure that i will have to add records within the next few month "I hope that makes sense. "
I was hoping to use something such as
but it does not work.
or if i try
how do i define that it will be with the current record that i am working with on my form.. And wich would be the best to use.(if i can get it to work)
Any help / adivse would be greatly appreciated
Kind Regards
Sn
I was hoping someone could possibly assist.
I have Two Tables
TblIntrvCandidates & TblEmpInfo.
In the "TbleIntrvCandidates" we have hundred of records of candidates being interviewed and using it for sending document etc. Once a candidates interview was not successfull or experience was not enough, the record status would be set to Inactive and that is the end untill next time they apply for something.
However once the cadidate is being made an offer i would like to move all the fields for that record we have to our "TblEmpInfo" Table.
All the Reocrds in the "TblIntrvCandidates" are in the "TblEmpInfo" Table. (But not vice versa)
(I know it is best to make use of status changes in on table and run queries, but we do not want to keep records of just interviewed candidates with permanent employees.
So i would like to create an after update statement, that when the users status is changed to "offer" made and append to the "empinfo" table swill run and a delete within the interview table on the current record.
I would like to make use of an append query, or a select * to not having to redefine the record names because i am sure that i will have to add records within the next few month "I hope that makes sense. "
I was hoping to use something such as
Code:
If Me.Status = "Offer" Then
iAnswer = MsgBox("Are you sure you would like to move the record for " & _
Me.FirstName & " " & Me.Surname & " " & _
"to the Employee table?", _
vbCrLf & vbYesNoCancel)
DoCmd.RunSQL ("INSERT INTO tblEmpinfo SELECT * FROM TblIntrvCandidates;")
DoCmd.RunSQL "DELETE * FROM TblIntrvCandidates WHERE (id='" & Me.ID & "')"
but it does not work.
or if i try
Code:
DoCmd.SetWarnings false
DoCmd.OpenQuery "QryAppendOfferDetails"
DoCmd.OpenQuery "QryDelIntvDetails"
how do i define that it will be with the current record that i am working with on my form.. And wich would be the best to use.(if i can get it to work)
Any help / adivse would be greatly appreciated
Kind Regards
Sn