Requerry Another Form

ddrew

seasoned user
Local time
Today, 22:52
Joined
Jan 26, 2003
Messages
911
I have a form with a text box on it that gets an average of a set of elapsed times from another form. What code should I use to, on the click of a button, carryout a requery of another form, thus updating my text box.

I tried

docmd.requery Forms![Average_Elapsed_Time]

clearly thats not right. Can someone help?
 
OK done that but I cant get the form to update unless I close it down and then reopen it again, Not ideal!
 
Uncle Gizmo - in reply to your question. Just to clarify. Ihave a form with a start tima and an end time with another box showing the elapsed time. On another form I have a box which calls the average elapsed time from a query. With me?
 
This is a bit cheesy, but I use it once in a while...(created by using the wizard to drop in a 'refresh form data' button)

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

From Acc2003, maybe a different menu command in other versions.
 
Cool, never used that before, only one problem, I still cant get the form that im caling the average time from to refresh, any ideas. Its aim is just to sit hidden in the backround holding the average time which is then calleb on to my main form. I might add that my main form is set to continuous, the average time is shown in a text box in the header. I tried calling it straight from the query but it didnt work, so I had to create a small form to hold the data and call itfrom that. Does this make sense to you?
 
Last edited:
I'd be happy to take a look if you could post those forms. Others may have some suggestions, but I'd need to see what's happening in the hidden form.

Chris
 

Users who are viewing this thread

Back
Top Bottom