Full Version: #Name? in textbox
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
I want to have an Unbound textbox display the maximum date in the VISIT table when the form opens. Something like this:
DMAX("[visit_dt]", "VISIT").
The form already has a data source from a different table. Not sure if that matters?
Although you could try to make it a calculated value, since the value is essentially going to be constant, I'd just compute it when the form opens/loads and put the value in there. So, if this textbox is named txtMaxDate, you could have
xtMaxDate.Value = DMax("visit_dt", "VISIT")
in the form's open or load event. If any actions on the form could possibly change the max value, then you might need to recompute it. But, if you do want to make it a calculated value, you can set its control source to
=DMax("visit_dt", "VISIT")
Hope that helps. frown.gif
Sure, no problem! frown.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.