Requering forms automatically (1 Viewer)

speakers_86

Registered User.
Local time
Today, 16:58
Joined
May 17, 2007
Messages
1,919
I am interested in making forms show current data, but I am hesitant to use requery in the timer event. Firstly, I have a huge aversion to the timer event in general. I don't like that I can sometimes tell when it runs. Sometimes the mouse wheel spins. If I am writing code and it runs my code bugs out. Secondly, I don't want to run a bunch of requeries if they are not needed since this application will have a lot of data. Is there an elegant way of doing this?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 21:58
Joined
Jul 9, 2003
Messages
16,285
What conditions change the data? What processes need to be informed when the data is changed?
 

speakers_86

Registered User.
Local time
Today, 16:58
Joined
May 17, 2007
Messages
1,919
On one machine there is an overview form that gives a snap shot of a few different things. This is mostly read only, and is popup and displayed on a second monitor all the time. If the user changes data using another form or at another terminal, the overview screen is no longer correct.
 

smig

Registered User.
Local time
Today, 23:58
Joined
Nov 25, 2009
Messages
2,209
So basicely you want to update a form on another machine.
I think it's not possible.
 

JHB

Have been here a while
Local time
Today, 22:58
Joined
Jun 17, 2012
Messages
7,732
Only for getting an overall view:

  • How many databases could be involved, (how may users had the overview screen open and is it always the same users)?
  • How many forms could cause the overview screen to be requeried?
  • And do the different users have the frontend database on their local drive or a conmen drive?
I don't like the timer event running, but in some circumstances it is the best approach.
Can't you design the timer event so, that it only runs if the overview screen is shown?
 

speakers_86

Registered User.
Local time
Today, 16:58
Joined
May 17, 2007
Messages
1,919
There are two computers, one account per computer. The backend is on one, while the frontend is on each. There are many forms that can cause changes to the overview, see below.

The overview screen has six subforms. Three show current missions, ended missions, and upcoming missions. The current missions has two controls that can be modified. Each mission will move between those three forms depending on the start and end dates. There are three other subforms in which records appear until the user navigates to those records and checks a box to archive it. Both computers keep this overview form open.

I would like a solution that works for all forms though. I'm thinking I can use the after update event to record the date time and compare that to a variable to determine if a requery is needed, and then carry out the requery if the user is not active (determining that is another issue). Or maybe display a button on the form if the user is active, just so I don't bother them if they are doing something.
 

JHB

Have been here a while
Local time
Today, 22:58
Joined
Jun 17, 2012
Messages
7,732
In what you've here, I don't think you can avoid the timer, but ofcause you can design it so that it only run when the overview form is open and only requery when it is necessary.
 

Lightwave

Ad astra
Local time
Today, 21:58
Joined
Sep 27, 2004
Messages
1,521
Sorry I don't have a solution but I can say I investigated this a number of years ago and couldn't find a solution for MS Access.

I think the problem is described as Complex Event Processing.

MS invented a framework specifically for handling this kind of scenario for SQL Server called Stream Insight as all the databases I am aware of without further bolt ons require your suggested solution of a timer to handle the requirements.

Some information on Stream Insight - think you need a full SQL Server licence for it.

https://msdn.microsoft.com/en-us/sqlserver/ee476990.aspx

Postgres also has some support for CEP as well here

http://www.postgresql.org/message-id/52693FC5.7070507@gmail.com
 
Last edited:

speakers_86

Registered User.
Local time
Today, 16:58
Joined
May 17, 2007
Messages
1,919
I appreciate that Lightwave, but all I have is Access. How about this, is there any way for message passing between front ends? How about blasting the local subnet over tcp/ip? I did a quick search and didn't see anything. I know VB.NET can us tcp or udp, but I'm not sure about Access. If it is possible but requires a reference, I would not be very enthusiastic.
 

Lightwave

Ad astra
Local time
Today, 21:58
Joined
Sep 27, 2004
Messages
1,521
Yes apologies I don't have a solution I am afraid.
 

Users who are viewing this thread

Top Bottom