My main form is a billing record for a single client with a subform to put in individual service records for that client. I am running the following code to make the calculations necessary in the subform. It works great. The problem is the biller who puts in these records is going bonkers because when this code runs it cause the subform to flash when it requeries. I believe because it is showing all the records getting requeried and ending with results. Is there a way to keep the action of the requery from being seen on the screen and still do what it needs to do? I have heard about an echo command, can that be used and if so could you show me how? Here's the code:
Private Sub Hours_Worked_AfterUpdate()
Dim frmMain As Form, sfrm As Form, hldMainID As Long, hldsfrmID As Long
Set frmMain = Forms![Billing Work Form]
Set sfrm = frmMain![Units Worked Billing Query subform].Form
hldMainID = frmMain![ClientID]
hldsfrmID = sfrm![ClientID]
frmMain.Requery
frmMain.Recordset.FindFirst "[ClientID] = " & hldMainID
sfrm.Recordset.FindLast "[UnitsID] = " & hldsfrmID
frmMain![Units Worked Billing Query subform].SetFocus
sfrm![UnitConv].SetFocus
Set frmMain = Nothing
Set sfrm = Nothing
Private Sub Hours_Worked_AfterUpdate()
Dim frmMain As Form, sfrm As Form, hldMainID As Long, hldsfrmID As Long
Set frmMain = Forms![Billing Work Form]
Set sfrm = frmMain![Units Worked Billing Query subform].Form
hldMainID = frmMain![ClientID]
hldsfrmID = sfrm![ClientID]
frmMain.Requery
frmMain.Recordset.FindFirst "[ClientID] = " & hldMainID
sfrm.Recordset.FindLast "[UnitsID] = " & hldsfrmID
frmMain![Units Worked Billing Query subform].SetFocus
sfrm![UnitConv].SetFocus
Set frmMain = Nothing
Set sfrm = Nothing