I have 2 forms, an unbound which calls a bound form via a command
button. Both forms have a textbox called TDate. The name of the
calling form is SelectionFrm. When I set the DefaultValue property of
the textbox on the called form to:
=[Forms]![SelectionFrm]![TDate]
I get exactly what I want in TDate on the called form.
But if I remove this from the properties and put the following code in
for the called form's open form event, it doesn't work:
Me.TDate.DefaultValue = [Forms]![SelectionFrm]![TDate]
I put a stop right after this statement. The value of
Me.TDate.DefaultValue shows correctly at that point. But on the screen
it comes up as '12/30/1899'.
I also tried putting it in the BeforeUpdate event of TDate. That didn't
work either.
Any idea why the code doesn't work while the property does? Or is it
impossible to set default values in code?
Robert
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!