|
Subject:
|
conditional formatting
|
|
Posted By:
|
jeremy1048
|
Post Date:
|
7/1/2008 4:57:34 AM
|
Hi all,
Got a novel or quick one for you. I have two text boxes on a form which have conditional formatting applied. The textboxes are unbound linked to separate DCount queries. The form as its a menu regularly being used rather than reload it, when not being used is hidden.
However when its made visible again the conditional formatting is not always being applied. I am using Access 2000 with this system. My code for the activation is:
Private Sub Form_Activate() 'check the reminders Me.txtoutstanding.Requery Me.txtfuture.Requery End Sub
The source for the two fields are:
=DCount("inspectid","qryoutstanding3")
=DCount("inspectid","qryfuture")
My question is there a way to get trigger the conditional formatting from within VBA without building the whole sql query for them both in the VBA to give the system a kick when it doesn't like doing it automatically.
However if you think it will make the system run quicker and easier then by all means tell me so.
|
|
Reply By:
|
SerranoG
|
Reply Date:
|
7/3/2008 10:13:01 AM
|
How about adding a Me.Refresh at the end there so that the form itself refreshes (as opposed to JUST the two textboxes)?
Greg Serrano Michigan Dept. of Environmental Quality, Air Quality Division
|
|
Reply By:
|
jeremy1048
|
Reply Date:
|
7/3/2008 11:05:46 AM
|
tried that one and it works fine for the future, just not the overdue box
|
|
Reply By:
|
SerranoG
|
Reply Date:
|
7/3/2008 11:17:26 AM
|
So your code looks like this?
Private Sub Form_Activate() 'check the reminders Me.txtoutstanding.Requery Me.txtfuture.Requery Me.Refresh End Sub
Greg Serrano Michigan Dept. of Environmental Quality, Air Quality Division
|
|
Reply By:
|
jeremy1048
|
Reply Date:
|
7/3/2008 11:20:33 AM
|
used to when the me.refresh line didn't work i deleted it.
|