0

I am new to access and I need help implementing a Dlookup function to call the associated value from a data sheet. I know how to run a perfect Vlookup in excel to solve this but I am lost for access. The issue is that I would like to automatically call the Book_ID when the Name_of_Book is entered or selected from the list in Student_Data. Please see attached images. This is the formula that I am trying is Book_ID:=DLookUp("Book_ID","Book_Data","Name_of_Book")

Student data

enter image description here

Function

enter image description here

Kalamarico
  • 5,466
  • 22
  • 53
  • 70
  • 2
    Avoid lookup fields in tables as they hide the structure. Lookups should be done at query or form level. See [look-up-vs-relationship-microsoft-access](https://stackoverflow.com/questions/16379232/look-up-vs-relationship-microsoft-access) or [The Evils of Lookup Fields in Tables](http://access.mvps.org/access/lookupfields.htm). – BitAccesser Oct 01 '17 at 03:05
  • I agree, I NEVER build lookups in table. So if you do have a Lookup with alias in table and are seeing book name, be aware the actual value in field is the Book_ID. Use a multi-column combobox or listbox on form to pull the Book_ID and Name_of_Book fields. – June7 Oct 01 '17 at 05:18
  • Ahh. Thanks for the advise guys. I will look into the suggestions and update you. –  Oct 01 '17 at 23:01
  • Sorry for the late reply. I got it to work by using a dynamic combo box on a form and used a macro to update the BOOK ID when a BOOK NAME is selected. –  Oct 06 '17 at 00:41

0 Answers0