Hi Everyone,
Access 2013, my Db has 4 tables. TbA,TbB,TbC and TbCalendar. TbA, B and C relate to tasks that need to be performed periodically. A query to each table (QryA, QryB and QryC with Left joins on the Tbl Calendar) populates 3 Forms FrmA, FrmB and FrmC respectively. Each form allows the user to record the task findings, date performed and their initials.
The Queries ask if the task has been performed within the last week/day/month. If they have, then the data will still appear on Form A, B or C. If it has not, said form will be blank. E.G for a daily task:
Code:
SELECT TbA.Temp, TbA.DateTaken, TbA.Name, TbCalendar.Date
FROM TbCalendar LEFT JOIN TbA ON TbCalendar.Date = TbA.DateTaken WHERE (((TbA.DateTaken)=Date()));
I have 3 small forms (SbA, SbB and SbC) each has 1 textbox fed off each query and are coded to have backcolour.red if null. These are on the ‘switchboard’ form so user opens up Db and sees if tasks need performing if textboxes are red. All works as required.
My problem is that when they have performed the task, the textbox stays red until closing and reopening the Db. I have played with Requery and Refresh using the ‘GetonFocus properties of the ‘subforms’;
Code:
Private Sub Form_GotFocus()
Me!Week.Requery
Me!Week.Refresh
Me!Week.Repaint
End Sub
But various combinations of the above pay no dividends. If anyone has any advice, I would be grateful.Hi Everyone,