gojets1721
Registered User.
- Local time
- Today, 15:40
- Joined
- Jun 11, 2019
- Messages
- 430
I created a function in a module shown below:
I wanted to use this in multiple forms/reports. No matter where it's is used, the form/report will always has a 'Location' field. That's why I tried using 'Me.Location' but obviously that doesn't work since 'me' is referring to the function itself.
Any suggestions on how to get around this issue without completely scrapping function?
Code:
Function GetEmail()
'GetEmail= DLookup("ManagerEmail", "tblLocations", "Location='" & Me.Location & "'")
End Function
I wanted to use this in multiple forms/reports. No matter where it's is used, the form/report will always has a 'Location' field. That's why I tried using 'Me.Location' but obviously that doesn't work since 'me' is referring to the function itself.
Any suggestions on how to get around this issue without completely scrapping function?