DLookUp only updates when i close the form

infantrie

New Member
Joined
Sep 9, 2009
Messages
33
I have a couple of DLookUps on a form and they only seem to update when i close the form! i suppose i could just enter the data and close the form for every entry, but i was hoping there was some fix i could put on the thing.

thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
From the field you are using behind in the properites look for either after update and then use a requery or refresh to the dlookup field
 
Upvote 0
Thanks very much. I've also now noticed that the data, whilst updating on the form is not actually making it into the table. I'm giving up. The gods must have been crazy to come up with this access thing. i'm going back to excel where humans are a natural part of the landscape. Thanks again for responding!
 
Upvote 0
My understanding is that dlookup only bring data to form but not to update table.....

You need to use ADO or DAO.
 
Upvote 0
" i'm going back to excel where humans are a natural part of the landscape"

oh don't give up on Access yet! You are right that many things are easier to do in Excel -- but here is where knowing when to use Excel and when to use Access is important.

If you change data and that causes the dLookups to get different values, you may just need to save the record to get them to refresh. On the AfterUpdate event of each of the source controls:

Code:
   Me.dirty =false
"dirty" is a form property that gets set to TRUE if a record has changes that need to be saved

if me.dirty then
is the same thing as
if me.dirty=True then

me.dirty = false

~~~~~~~~~~
if this doesn't do the trick, post the ControlSource for the controls that aren't getting the values updated
 
Upvote 0
thank you very much! funny thing though, when i changed the AfterUpdate event, my text was automatically changed from Me.Dirty=False to You.ShouldProbablyGiveUp,Jackass=True.

jk of course, but i wouldn't be surprised to see that at some point. i am going to try to implement that now. i really appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,476
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top