I have a form with a button that runs some VBA code to run an append query that adds some of the detail in the record just added to a table task list. The issue is that it looks like the record has not yet been written when the code runs. E.g. if I manually view the append query before clicking the button (No Results) but if I click off the record then back on to it, then manually view the append query (the query shows the expected results). Therefore I have come to the conclusion that I need to add a line to the code that saves the record first, however I have tried several options and got totally confused with the difference between:
DoCmd.Refresh
Me.Refresh
Repaint
Recalc
Save
Requery
What should I use to save the record before running the append query please?
My Code:
Code:
DoCmd.SetWarnings False
Me.Recalc
DoCmd.RefreshRecord
'DoCmd.Requery
DoCmd.OpenQuery "Qry_Apend_TimeCredit_Task"
MsgBox "Your request for time owed has been sent to your manager. Your statement will be updated when approved."
Any help appreciated