I have the following code:
Code:
Private Sub btnLaunchUserDetail_Click()
tmpfirstname = DLookup("Firstname", "Users", "ID = " & Me!ReportsToID)
tmpsurname = DLookup("Surname", "Users", "ID = " & Me!ReportsToID)
tmpemail = DLookup("Email", "Users", "ID = " & Me!ReportsToID)
tmptelephone = DLookup("Telephone", "Users", "ID = " & Me!ReportsToID)
MsgBox (tmpfirstname & " " & tmpsurname & vbCrLf & vbCrLf & tmpemail & vbCrLf & tmptelephone)
End Sub
This works, but I am not sure if it would be more efficient to use a SELECT statement?
If using SELECT is better, how would the above code be written to accomplish what it achieves?
I have played around but can't get the syntax etc working. All help appreciated.
Thanks