I am trying to use Dlookup to populate a text box on a form, but
haven't had any good luck so far. I've looked here at the posts
and have used the Access help for examples. Northwind is way over my
head. I think that I'm coming up short in the Criteria part of the
function.
I have a combo box that looks to the 'Student' table,
'Student_ID' field to list the students, and then places the
selected value in the 'Student_ID' text box on the 'Order'
form. The combo box part works well. The text boxes on the
'Order' form are bound to an 'OrderEntry' table.
What I am trying to do is to fill in the 'LastName' text box in the
'Order' form using the data from the 'Student' table,
'LastName' field. I think that the criteria for the lookup would
be the value in the 'Student_ID' combo box on the form, using an
event procedure triggered by the AfterUpdate event.
What I would like is to have an example of the Dlookup function as it
applies to my application.
Many thanks for your time and any help given.
David