Auto Click textbox on form?

jonnywakey

Registered User.
Local time
Today, 20:41
Joined
Feb 2, 2009
Messages
33
Hi

I have a form which contains a textbox called Expire_Date.

When the form is running, the contents of the [Expire_Date] txt box triggers
some vba to populate another textbox [Flag] with "Valid" or "Expired" based on the date in [Expire_Date].

Textbox [Flag] is conditionally formatted but will only change if you click on the [Expire_Date] field.

Is there a way to use vba to click this field for each entry as there are multiple?

Many thanks

jonny
 
It sounds like you're going about this all wrong.
First, "Conditional Formatting" does not require an event to trigger it. It sounds more like you have CODE that formats the box a certain way.

Second, it sounds like you're storing the [Flag] value when this should be a calculation.

On your form in the Flag textbox type the following in the Control Source property:
Code:
=Iif([Expire_Date]<Date(),'Expired','Valid')

Then using true Conditional Formatting on the textbox to change the appearance of it.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom