Cause a DLookup formula to update using VBA

  • Thread starter Thread starter xp
  • Start date Start date
X

xp

I have a form with a DLookup formula in the "Control Source" of a text box.
This runs fine when the form loads.

After the users run an update, I want to trigger the DLookup formula to
refresh itself from a code module so the form will display current
information. I tried something like:

Forms("MyForm").Controls("MyControl").Refresh

But this fails, can anyone please help me out on this?

Thanks!
 
I would try using the recalc method in the form's current event.
Me.Recalc
or if you are doing this outside the form's events then
Forms("MyForm").Recalc


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top