notice changes to table in subform

userZ

Registered User.
Local time
Today, 06:27
Joined
Oct 14, 2014
Messages
12
I have a subform that is linked to a table. The subform is part of my form.
The table has fields such as date, time and true/false(false being the default value) field. In the begin of each day 12 rows gets added to the table. One row for each hour. Some other applications somewhere else can set the true/false field to true. I am trying to find a way that if the my form is up and another application is updating true/false field to true, then a message box from within my subform or my form pops up and shows the date, time and a statement that the check box related to the true/false is checked. Is this possible and how?. Is there any example of this available somewhere?.:banghead: Access 2003.
 
I'm not even sure what you are asking...
I am trying to find a way that if the my form is up and another application is updating true/false field to true, then a message box from within my subform or my form pops up and shows the date, time and a statement that the check box related to the true/false is checked. Is this possible and how?.

you want a msgbox to appear if someone checks a box to true?
 
You could add a timer event to the subform that checks the table for updates at an interval of your choice but you would need a flags to indicate that the Msgbox was presented. Let's say you add a Yes/No field to the table named CheckBoxAck that would be initially set to false then you timer event code would

  1. Query the table for records where the True/False field is True but the CheckBoxAck is False
  2. Update the CheckBoxAck field to True for the record found
  3. Present the message box with the record info and time.

The problem with this approach is that the message box would block the timer event until acknowledge. So for example if nobody clicked on the message box all day there would only be one message box showing not eight. Rather than a display message box I suggest have the event timer code just beep (DoCmd.Beep) and store the time in a field you need to add to the table. You could use conditional formatting to change the color of something in the record to highlight that the True/False field was set to true; something other than the checkbox as conditional formatting can't be applied to them.
 

Users who are viewing this thread

Back
Top Bottom