Klatuu said:
Albert,
I notice in your solution and in Dale's, you make the dialog form go
invisible then retrieve the data from the original form. What is your
reasoning for doing it that way?
My technique is to pass the data from the dialog to hidden controls on the
original form. If your solution has advantages over mine, I would be
interested in knowing what they might be.
Thanks,
I think my approach is more "old" style thinking. the advantage of my
approach is that you can build a routine to get a date.
eg::
dtMyStartDate = MyGetDate()
The function MyGetDate can launch the form, get he user input, and then
return the value. so, I might not be wanting to return values to fields or
properties of the form, but simply prompt the user with a nice custom date
form, or some type of form to grab some type of input (perhaps a prompt for
the users initials to run a danger process).
Further, it means for each form, or code that I want to re-use this prompt
form, I don't have to create those hidden controls.
I talk about this advantage here:
http://www.members.shaw.ca/AlbertKallal/Articles/PickSql/Pick4.html
However, that article was written about 6-7 years ago. And, right now, I am
reframing from using dialog forms. While they allow re-use of forms, they
break the windows interface (you can't use the menu bar for example).
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)