Controlling a value of one edit box based on another in a dynamic form

  • Thread starter Thread starter schmid
  • Start date Start date
S

schmid

Basically I have a dynamic form with several date fields. One of which
is a "finish date". All of these fields have a control source of a
field from a table. When the value of the finish date is anything but
blank, meaning it has an actual finish date, I want to set the value of
another edit box to a value of "Closed". If there is no finish date I
want it to have a value of "Open".

I have tried several things here inluding expression builder and have
been unsuccessful. Does anyone have a quick and easy way to do this?

Thanks in advance!

Regards

schmid
 
Make the Default Value of the Status Box "Open"

Put this in the After Update Event of the Finish Date Box:

If Not(IsNUll(Me.txtFinishDate)) Then
Me.txtStatus = "Closed"
End If
 
When I do this it handles making the change after I have added a date
to the finish date box. However, when I first open the form and there
are for example five entries, 2 of which are closed, 3 are not. This
does not handle when the form is loading with all the dates alread in
the table it is reading from. How do I handle that?
 
After more testing the code you gave me below will change every entry
in the dynamic form to Closed when I enter a finish date for any of
them...
 
Back
Top