link query results to text boxon form

mmjr103

Registered User.
Local time
Today, 12:22
Joined
May 14, 2012
Messages
10
Ok, I’m going to try to again! I created a DB (in A2007) and now using A2010 and I have run into a wall, and have been pulling my hair out. Here is a description on my current problem…

The DB is one-to-many table relationships. The main table is EInfo which stores all the contact info for the individuals in the DB. I have another table W..Dates that which tracks the individual’s annual requirements (date & location). They are linked by relationship by the Eval ID.


I then created a query to generate the most recent date for the individual’s annual requirement (Eval ID & MaxofW…Dates). The query sorts and displays the most recent date for the individual.

Now, I have a form (E_form) in which I would like the results to display the individual most recent date for their annual requirements. I have tried several =DLookUp functions but can’t seem to place my finger on it, so to speak. I got it to display the the most recent date of the entire Query, however when I select the individual from my Combobox on the form, the date does not reflect that individuals most recent date. It stays constant with the Max date of query.

Query (Design View) -attached
Query Results - attached
Table View (Not E_ID has three entries) - attached
Displayed on the form all the time - attached


I’ve been entering in the expression in the ControlSource for the text box. Shown below is the expression that generates the above results. I have tried some many, but keep going back to this as all the others have generate errors or ?Names in the text box.

=DLookUp("[MaxofWorkshop Date]","Wkshp_Query")


The problem is that the text box is not linking by the Eval ID and properly displaying for the selected individual on the form. Any help would be greatly appreciated.
 

Attachments

Thanks, but could you be a little more specific? I looked at the URL provided and not sure which to use. I tried one of them for the dates and received #Error in the text box. Any help would be appreciated, as I am still a novice at Access. Thanks
 
It would be based on the data type of the field in the criteria, which sounds like eval id.
 

Users who are viewing this thread

Back
Top Bottom