G
Guest
I've tried about a dozen things posted on this discussion group and I'm
messing something up somewhere.
Here goes:
I have a form "Audits" with 2 subforms "AuditResults subform" (yes, there
is a space in there) and "AuditScores subform".
When I am finished with my work in "AuditResults subform", I want to click a
button that does the following:
Run an append query that will post the results to the AuditScores table
Refreshes/Requeries/Repaints the "AuditScores subform" to show the results
Goes anywhere other than where it started (insert any field here).
I've tried macros, but I can't repaint the form unless it has the focus, and
of course I can't get the macro to send the focus to the subform.
I've tried code:
Private Sub Finalize_Click()
DoCmd.RunMacro "SetFinalScore"
Me.[AuditScores_subform].SetFocus
'also tried Me.AuditScores subform.SetFocus
'and tried Me.[AuditScores subform].SetFocus
Me.[AuditScores_subform].Requery
'also tried Me.AuditScores subform.Requery
'and tried Me.[AuditScores subform].Requery
End Sub
I cannot figure out what I'm doing wrong. I'd REALLY like to do this in a
Macro (company doesn't support VB) but at this point I'll take any help I can
get. Anyone have a few minutes to help me out?
messing something up somewhere.
Here goes:
I have a form "Audits" with 2 subforms "AuditResults subform" (yes, there
is a space in there) and "AuditScores subform".
When I am finished with my work in "AuditResults subform", I want to click a
button that does the following:
Run an append query that will post the results to the AuditScores table
Refreshes/Requeries/Repaints the "AuditScores subform" to show the results
Goes anywhere other than where it started (insert any field here).
I've tried macros, but I can't repaint the form unless it has the focus, and
of course I can't get the macro to send the focus to the subform.
I've tried code:
Private Sub Finalize_Click()
DoCmd.RunMacro "SetFinalScore"
Me.[AuditScores_subform].SetFocus
'also tried Me.AuditScores subform.SetFocus
'and tried Me.[AuditScores subform].SetFocus
Me.[AuditScores_subform].Requery
'also tried Me.AuditScores subform.Requery
'and tried Me.[AuditScores subform].Requery
End Sub
I cannot figure out what I'm doing wrong. I'd REALLY like to do this in a
Macro (company doesn't support VB) but at this point I'll take any help I can
get. Anyone have a few minutes to help me out?