I have an MS Access database (Access 2002). When users change a field
(let's call it the 'status' field) on a record using a query, they
close the query and get back to a form which displays a textbox for
each record. A colleague has set things so that the colors of these
textboxes correspond to the status' of the records.
Now what I need to do is set things so that when a user opens the
'master form' (the one that displays the textboxes that change color
based on records' status) a sound plays when there is a change to any
record's status field.
(I should say that my colleauge uses some crazy lookup in the
expression boxes of the textboxes to lookup the status of each record,
and change the colors of the textbox as needed.)
Here is a solution I was pondering. Let us say that there are 20
records in view here. That means 20 textboxes on the 'master form'.
Would there be a way to have 20 matching, hidden textboxes, each of
which take on the value of it's twin when the form is closed (using
vba, or whatever in the unload event)? O.K. so in the load event of
this form, I have code that checks each set of fields, and if there
are any that do not match, the sound goes off? If this is a good
solution, please provide details, and even code, if you have pity and
time. If you have a better one, please provide.
The sound bit is not the crucial thing; I was thinking of using a
simple beep, but I see that one can even add an ole wav file and have
that run using vba in the load event of the form.
If this is not enough money, please say so and I may pay more.
Cheers and thanks! |
Clarification of Question by
crom654-ga
on
18 Sep 2002 14:10 PDT
I don't feel like I was being very clear in explaining my solution.
Each visible textbox on the master form would have a matching, hidden
textbox that would be assigned the former's value on unload of the
form. So what is happening is, when the form is loaded, the vba code
in the load event will be able to check if there have been changes,
and act accordingly. But what if the user does not 'load' the form?
What if it is just sitting there on his screen? Anayay, any help is
appreciated.
|
Clarification of Question by
crom654-ga
on
18 Sep 2002 16:07 PDT
Thanks Daevalmighty for the comment, but I fear I have still not
explained this thing well enough.
The 'master form' does not get edited. All it does is lay out the 20
texboxes, each of which is color coded to let the user know what the
status of the corresponding record is. (My colleague uses something
called conditional formatting to accomplish this). So the user
interacts with the data (sets the status of the records) via queries,
and when the queries are closed, the 'master form' should (and for her
and for other users on the network) display color changes in the
textboxes AND (if you can give me an anwer) play a sound.
For the purposes of this dicussion, there are 2 fields per record:
'name' and 'status'. 'Status' is the thing that changes the colors of
the textboxes on the 'master form'. In addition, changes in the status
field should result in sounds on the 'master form'. Am I making sense?
|