Ben,
VBA would provide no advantage compared with macro, you would still need
to take care of the same thing.
Your macro that runs on the Current event needs to take care of both
possibilities, and set the visibility of the 2ndReentryDate control
based on whether there is data in the ExitDate2. That means this macro
will need two SetValue actions, one to make 2ndReentryDate visible, and
one to hide it. You would put a Condition for these two actions, i.e.
[ExitDate2] Is Not Null
[ExitDate2] Is Null
--
Steve Schapel, Microsoft Access MVP
Ben said:
Thanks Steve. That get's me a bit closer. One more step.
Now, due to the SetValue, Visible = Yes in the AfterUpdate event of
ExitDate2, 2ndReentryDate appears on the form as needed.
Due to the re-set of 2ndReentryDate to Visible = No in the form's On Current
event, when the form focuses on a different record (I think that is the right
terminology), the 'appeared' control goes away (as it should).
However, when I go back to the record that I entered ExitDate2 for,
2ndReentryDate is still not visible (i.e. the visible doesn't persist). I
get why, because the On Current says "hide it" and its only AfterUpdate that
it says "appear it" (as non-db language as that description is) and I'm not
updating the control (because I already did). What I need now is some way to
say "If ExitDate2 is not Null, then 2ndReentryDate should stay visible."
At this point, I've been doing all of this using the Macro function and
expression builder. I have the sense I'm sliding towards the need or VBA, at
this point.