M
macoldtimer
The database I am designing is a backup to another program which
tracks calls. Mine is a cut-down version meant to be used when the
main program crashes, rarely, or when it is taken down for two to
three hours once a month for maintenance. I am trying hard to make
Access function the exact same the original program so there is no
learning curve or training time required. So, far this meant using a
text box as a command line to open the form(s) to input the calls,
dispatch the calls, add comments to the calls etc. The problem I am
running into is on the visual side. The original program color-codes
the calls based on certain criteria which I want to match. I am using
conditional formatting to color-code, but have found out since I need
to requery every 2-3 seconds, the colors make a flash or flicker
effect. This flashing or flickering is what I need to eliminate.
The database has a front and back end. One reason I need to requery
so often is that several people will be entering and updating calls at
one time with every time sensitive information. The main form has the
command line and two sub-forms. The top sub-form, named frmNonDisp,
is a continuous form which displays uncompleted active calls that have
not been dispatched. The bottom sub-form, named frmDisp, is a
continuous form which displays uncompleted active calls which have
been dispatched. Each sub-form’s recordset is based on a query of the
main table.
For calls that are received and not dispatched (top sub-form called
frmNonDisp) conditional formatting occurs for two fields, the “Status”
field and the “Time” field. The Status field turns from green to red
when someone adds a new “comment” to the field Information field.
This lets the dispatcher know there is new information that needs to
be aired over the radio.
The way I achieve this is having the query call a VBA function. As the
form loads it queries all active calls it adds the call number and
information field to a custom collection. Every time the call
requeries it checks to see if data in the information field of the
table (tblcalls) differs from the information in the custom
collection. If the two values differ then the value of true is
returned, if they are the same then false is returned. This Boolean
value is assigned to an invisible check box, which is NOT bound to the
table (tblcalls). Once the dispatcher opens the call and looks at the
information field the data is then passed to the custom collection
making them “equal” thus returning a false on the next requery turning
the Status field green. [The reason I do not store this value in the
table is that if another calltaker or dispatcher looks at the
information it would “clear” or return the value of false to the
table, and the Main dispatcher would possibly never have seen that
there was new information.] The requery thus briefly returns all
Status fields to green for a fraction of a second, before each Status
field that needs to be red turns red for a second or two then it
requery happens all over.
The “Timer” field turns from green to red, using conditional
formatting, when the query calls a function to see how long the call
has been received and the elapsed time is greater than what the
priority of the call allows. Again, this function turns True or False
and assigns it to an invisible check box, which is NOT bound to the
table.
As for dispatched calls (bottom sub-form called frmDisp) the “Status”
field still changes to red in the same manor has above. However,
depending on the whether a person is enroute to the call or arrived at
a call determines what color the entire record/line appears. For
example, if a person is enroute the call number, priority, address,
status, etc would all be yellow. If the person has arrived at the
address then all those fields are aqua blue. This same flashing
effect occurs as above.
Any suggestions on how to constantly show new active calls and flag
for new information for each user, whether or not another user has
viewed the new information, without having the conditional formatting
flicker/flash on every requery.
Thanks!
tracks calls. Mine is a cut-down version meant to be used when the
main program crashes, rarely, or when it is taken down for two to
three hours once a month for maintenance. I am trying hard to make
Access function the exact same the original program so there is no
learning curve or training time required. So, far this meant using a
text box as a command line to open the form(s) to input the calls,
dispatch the calls, add comments to the calls etc. The problem I am
running into is on the visual side. The original program color-codes
the calls based on certain criteria which I want to match. I am using
conditional formatting to color-code, but have found out since I need
to requery every 2-3 seconds, the colors make a flash or flicker
effect. This flashing or flickering is what I need to eliminate.
The database has a front and back end. One reason I need to requery
so often is that several people will be entering and updating calls at
one time with every time sensitive information. The main form has the
command line and two sub-forms. The top sub-form, named frmNonDisp,
is a continuous form which displays uncompleted active calls that have
not been dispatched. The bottom sub-form, named frmDisp, is a
continuous form which displays uncompleted active calls which have
been dispatched. Each sub-form’s recordset is based on a query of the
main table.
For calls that are received and not dispatched (top sub-form called
frmNonDisp) conditional formatting occurs for two fields, the “Status”
field and the “Time” field. The Status field turns from green to red
when someone adds a new “comment” to the field Information field.
This lets the dispatcher know there is new information that needs to
be aired over the radio.
The way I achieve this is having the query call a VBA function. As the
form loads it queries all active calls it adds the call number and
information field to a custom collection. Every time the call
requeries it checks to see if data in the information field of the
table (tblcalls) differs from the information in the custom
collection. If the two values differ then the value of true is
returned, if they are the same then false is returned. This Boolean
value is assigned to an invisible check box, which is NOT bound to the
table (tblcalls). Once the dispatcher opens the call and looks at the
information field the data is then passed to the custom collection
making them “equal” thus returning a false on the next requery turning
the Status field green. [The reason I do not store this value in the
table is that if another calltaker or dispatcher looks at the
information it would “clear” or return the value of false to the
table, and the Main dispatcher would possibly never have seen that
there was new information.] The requery thus briefly returns all
Status fields to green for a fraction of a second, before each Status
field that needs to be red turns red for a second or two then it
requery happens all over.
The “Timer” field turns from green to red, using conditional
formatting, when the query calls a function to see how long the call
has been received and the elapsed time is greater than what the
priority of the call allows. Again, this function turns True or False
and assigns it to an invisible check box, which is NOT bound to the
table.
As for dispatched calls (bottom sub-form called frmDisp) the “Status”
field still changes to red in the same manor has above. However,
depending on the whether a person is enroute to the call or arrived at
a call determines what color the entire record/line appears. For
example, if a person is enroute the call number, priority, address,
status, etc would all be yellow. If the person has arrived at the
address then all those fields are aqua blue. This same flashing
effect occurs as above.
Any suggestions on how to constantly show new active calls and flag
for new information for each user, whether or not another user has
viewed the new information, without having the conditional formatting
flicker/flash on every requery.
Thanks!