Refresh the contents of a dlookup field on a form.

SLCOMEAUXJR

New member
Local time
Today, 17:32
Joined
Aug 10, 2014
Messages
4
I have a field on a form that is the results of a dlookup to a table.field. I want the value to be updated when I execute a button that is running a macro. How do I do this automatically, and not have to hit the refresh button?
 
Sounds like you need to Requery the control that is using the DLookup() function
 
You can requery the control after running the query:
Code:
Me.[COLOR="Blue"]ControlName[/COLOR].Requery
 
You can requery the control after running the query:
Code:
Me.[COLOR="Blue"]ControlName[/COLOR].Requery
@vbaInet
I think the OP is using a macro for whatever action he/she is carrying out so presumably the Requery will need to be done in that macro. Not sure though because I don't use macros.
 
@vbaInet
I think the OP is using a macro for whatever action he/she is carrying out so presumably the Requery will need to be done in that macro. Not sure though because I don't use macros.
At least they get the gist of it. I don't use macros either but there's a Requery action that can be run on controls.

Wow, both at 9:01. This where a timestamp would be cool, just to see how close it really was.
Do you mean 5:01? Unless it's showing differently on your side? I'm sure the time is formatted not to show the full timestamp (with seconds).
 
Interesting! I didn't know the forum compensated for that.
I and MarkK have seen 3 people reply at the same time. It was a forum's first! :D
 

Users who are viewing this thread

Back
Top Bottom