Hello,
First just want to say im going to try and explain this the best I can and hope i dont confuse people :)
What I have is a form to delete a record. Now what I have set the form up to do is pull up the record and then press a button to delete the record. At the same time when the record is deleted I have an Append Query run that makes a copy of the record being deleted. Now I also have a hidden box on the form that captures the users ID so i know who is deleting a record. My problem is this box is not working.
What im having trouble is getting the form to save the one box along with the information that is being appended. I have been trying a lot of save form command combinations but so far no luck. Im just looking for a VB code that will run the append query and at the same time save the hidden box information to the same table at the same time. Also i have a column set up to save the hidden box info to.
Appreciate the help on this!
here is an example of what i have so far...
First just want to say im going to try and explain this the best I can and hope i dont confuse people :)
What I have is a form to delete a record. Now what I have set the form up to do is pull up the record and then press a button to delete the record. At the same time when the record is deleted I have an Append Query run that makes a copy of the record being deleted. Now I also have a hidden box on the form that captures the users ID so i know who is deleting a record. My problem is this box is not working.
What im having trouble is getting the form to save the one box along with the information that is being appended. I have been trying a lot of save form command combinations but so far no luck. Im just looking for a VB code that will run the append query and at the same time save the hidden box information to the same table at the same time. Also i have a column set up to save the hidden box info to.
Appreciate the help on this!
here is an example of what i have so far...
Code:
Dim stDocName As String
Dim stDocDel As String
stDocName = "AppendDelRecord"
DoCmd.OpenQuery stDocName, acNormal, acEdit
RunCommand acCmdSaveRecord("Text12", "DeletedRecord", "UserDeleted=" & Me.Text12)
Comment