E
efandango
I have a subform that I want to requery, but whatver I try doesn't work with
the code below: But if I manually press F9, the form will requery.
I have had to restort to putting the SendKeys "{F9}" into the code which
will make the form do the required requery.
Can someone tell me what I am doing wrong?
My Code:
Private Sub btn_Reset_Run_Reveal_List_Click()
CurrentDb.Execute "DELETE * FROM tbl_Run_Reveal_Target"
DoCmd.OpenQuery "Qry_Run_Reveal_Selector_Delete"
DoCmd.OpenQuery "Qry_Run_Reveal_Selector"
Forms![frm_Runs].[frm_Run_Reveal_Target].SetFocus
Forms![frm_Runs].[frm_Run_Reveal_Target].Form.[Run_waypoint].SetFocus
Me.Run_waypoint.Requery
SendKeys "{F9}"
Me.Requery
End Sub
the code below: But if I manually press F9, the form will requery.
I have had to restort to putting the SendKeys "{F9}" into the code which
will make the form do the required requery.
Can someone tell me what I am doing wrong?
My Code:
Private Sub btn_Reset_Run_Reveal_List_Click()
CurrentDb.Execute "DELETE * FROM tbl_Run_Reveal_Target"
DoCmd.OpenQuery "Qry_Run_Reveal_Selector_Delete"
DoCmd.OpenQuery "Qry_Run_Reveal_Selector"
Forms![frm_Runs].[frm_Run_Reveal_Target].SetFocus
Forms![frm_Runs].[frm_Run_Reveal_Target].Form.[Run_waypoint].SetFocus
Me.Run_waypoint.Requery
SendKeys "{F9}"
Me.Requery
End Sub