Full Version: Continous Form With Dates
UtterAccess Forums > Microsoft® Access > Access Forms
Aquadevel
Hi My 'Utter Friends,
I have a popup continous form that I'm using for a client to notify the users when certain dates are approaching, and blink it.
I'm using the following in a timer event:
Private Sub Form_Timer()
If [RequiredDate] < Date Then
If [RequiredDate].ForeColor = vbRed Then
[RequiredDate].ForeColor = vbBlack
Else
[RequiredDate].ForeColor = vbRed
End If
End If
End Sub
But it blinks ALL dates not just the 'valid' ones due to the form type.
Anyone point me into what I need to keep it on just the correct date controls?
Thanks,
iconfused.gi
 </div>
</div><div class='postwrapper'>
 <div class='posttopbar'>
  <div class='postname'>theDBguy</div>
  <div class='postdate'>Oct 19 2011, 12:03 PM</div>
 </div>
 <div class='postcontent'>
  Hi Aqua,<br />You might try using Conditional Formatting in your code. Check out FormatConditions in Access Help.<br />Just my 2 cents... <img src=
Doug Steele
Sorry, that's the way continuous forms are. While it may look as though you have, say, 20 controls containing the RequiredDate on the form, in actual fact you've only got one, repeated 20 times. Any changes you make to that one control is repeated for all of them.
Take a look at using Conditional Formatting.
theDBguy
Hi Aqua,
So, did you look up FormatConditions and tried it? My thought was to modify the conditional formatting to change the color when your timer fires.
Just my 2 cents... 2cents.gif
Aquadevel
Hey TheDB,
did away with the timer event of the form, and used conditional formatting on the date control on the form.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right.
For expiration date, it works properly, but on the 30, 45, 60 day controls due to 'DateAdd' calculating those dates, the conditional format is not right. <
theDBguy
Hi,
nstead of "y," try using "d" in your DateAdd() expression.
Hope that helps...
Aquadevel
TheDB,
orrection
The DateAdd is cal'n the 30, 45, 60 dates properly.
Its the using the DateAdd as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. < as condition for color change that is not working. <
theDBguy
Can you post your full CF condition expression? I don't think you're supposed to have the equal "=" sign in there. It should be either:
ield Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
< It should be either:
Field Value Is DateAdd("d",...
Or
Expression Is [FieldName]=DateAdd("d"...
<
Aquadevel
TheDB,
Using condition of control:
Between Date()<[CertificationExpireDate] and Date()<DateAdd("y",-30,[CertificationExpireDate])
To change the back color
theDBguy
Thanks. Try changing it to:
etween DateAdd("d", -30, [CertificationExpireDate]) And [CertificationExpireDate]
Hope that helps...
Aquadevel
TheDB,
till no go..
I'm trying to get the DateAdd 30 control to turn red when the date() is less than the cert expire date AND date() is greater than DateAdd 30 Date
theDBguy
Can you post the db?
Aquadevel
TheDB,
ts Attached
Thanks,
theDBguy
Hi Aqua,
couldn't test the changes I made because the test db didn't include the query being called by the form but see if it makes a difference.
Hope that helps...
EDIT: I decided to use the table instead of the query so I could test it. Check out this new version...
Aquadevel
TheDbGuy,
Help I think I got it like I wanted it.
Used (Date()+30), (Date()+45), & (Date()+60) as the conditions.
Have another system to modify, so will re-check it later with more test data in it.
Thanks for the help!!
theDBguy
Hi Aqua,
Glad to hear you figured it out. I also noticed that you haven't downloaded the latest db update I posted earlier. Let me know if it doesn't help.
C
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.