|
|||
|
On Jul 16, 6:17*pm, Lou O <lgeastw...@gmail.com> wrote:
> On Jul 16, 1:48*pm, Roger <lesperan...@natpro.com> wrote: > > > > > > > On Jul 16, 1:29*am, DeZZar <derrick.goost...@gmail.com> wrote: > > > > On Jul 16, 7:35*am, Roger <lesperan...@natpro.com> wrote: > > > > > per the documentation, this event is triggered when the form gets > > > > focus... > > > > > so if I start ms-access and open the form, the event triggers > > > > > if I now start ms-word, and do some typing > > > > > and now I go back to msaccess, doesn't the form get focus, shouldn't > > > > that event trigger ? > > > > or does only the ms-access application get focus ? > > > > if so, is there an event that will trigger, that I can use ? > > > > > the reason I'm asking, the form is a dashboard (continuous form) > > > > showing the status of current sales orders > > > > > and while I doing ms-word typing, someone else may update the status > > > > of an order that is shown on my dashboard > > > > > so when I go back to msaccess, I want the dashboard to show the new > > > > status for the order, so I put a "me.requery" as the gotFocus event, > > > > but it never triggers > > > > > if I click the 'windows' in ms-access and choose another form, then > > > > choose my dashboard form, the gotFocus event fires > > > > > I tried the onActivate event and it behaves the same as the gotFocus > > > > event > > > > > I can setup a 'ontimer' event that fires every x seconds, but I afraid > > > > of what happens if the ontimer event fires whilst the user is updating > > > > a textbox on the form > > > > > any other ideas on how to achieve this ? > > > > it won't trigger the onfocus as access considers the form to already > > > have the focus. *by switching between applications you are not > > > triggering the onfocus event of the form. > > > > I would suggest putting a "Refresh" botton on the form to do what your > > > asking.- Hide quoted text - > > > > - Show quoted text - > > > yeah, I thought of a 'refresh' button, when I thought of the timer > > event... > > but it would be nice if the application object had a 'gotfocus' event > > Does the form not have a onActivate event? > This works well for me in some situations.... > but I'm running Access2007 > I upgraded from A97 and I don't remember if that forms event was > available in A97 > mmm...- Hide quoted text - > > - Show quoted text - yes, there's both onActivate and gotFocus events and frmB.onActivate fires if I go from frmA to frmB within the same ms- access application, and the me.requery statement works as required now that I'm on frmB, if I minimize my desktop to open outlook to send an email, and close outlook when I click on ms-access in my taskbar, I'm back in the ms-access application looking at frmB but the onActivate doesn't fire because as far as access is concerned the form was not activated, it was / is already selected but when I clicked on ms-access in my taskbar, the msaccess would have gotten an 'on activate' event from Windows that it should've propogated to the current form, but didn't (ms-access in its wisdom does not pass on all windows event messages) . And I'm wondering if there's a way for me to trap this access application onActivate event |
|
|
||||
|
||||
|
|
![]() |
| Popular Tags in the Forum |
| access97, event, form, gotfocus |
| Thread Tools | |
| Display Modes | |
|
|