All,
It has been a couple of years since I've done db design, but getting back into it for personal needs. I can't recall ever having such a hard time with Dlookup. Here is the code;
Dim TestE As String
TestE = DLookup("email", "Employee", "efullnamerev = '" & Forms![frmofficeadd]![PrimName] & "'")
MsgBox TestE
In the table related to frmofficeadd, the PrimName is a combo/lookup back to the employee table efullnamerev. When you go into the form you select the name and after update, it should run the above code and set TestE to the email address that is stored in the employee table related to the name.
Right now, the code keeps returning null.
If I set the last bit to "efullnamerev = Smith, John'" It returns the email address associated with this name from the employee table.
Its late and I am sure I am missing something minor here.
Thanks
Mike