Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form requery action causes screen to jump

Status
Not open for further replies.

dbar10

Programmer
Dec 5, 2008
196
US
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
 
Sorry, I figured it out. I guess I jumped to you guys to soon. You all are great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top