Access 2003/2007 Dlookup Control on Form will Not Populate Date

Posted on 2007-10-04
Medium Priority
Last Modified: 2013-11-28
I have a form in Access 2007 (a 2003 database) and I have a simple Dlookup control.  

=DLookUp("FacilityName","tblFacilities","[FacilityNo]= Forms!frmNonComp!Facility")

The control works, but will only show the data when I click on it.  When I change the form to the next record it continues showing data for each record, but will not show data for a new record.  When I close the form and then reopen it, it comes up blank again.

I cannot figure this out.
Question by:dvelasquez
1 Comment
LVL 10

Accepted Solution

slamhound earned 500 total points
ID: 20019073
You need to add this to the On Current event:

me.Myfield = DLookUp("FacilityName","tblFacilities","[FacilityNo]= Forms!frmNonComp!Facility")

That way it will be regularly updated.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question