Code:
Me.Parent.txtExchange = ToUGX(Me.Parent.txtDate, Me.Parent.Currency)
Code:
Public Function ToUGX(ByVal ExchangeDate As Variant, ByVal CurrencyCode) As Double
' ...
TEXT_SOUGHT_FOR1 = Replace$(Replace$(TEXT_FIND, "@1", CurrencyCode), "@2", _
DLookup("Description", "Location_Currency", "Currency = '" & CurrencyCode & "'"))
' ...
Code:
? Replace("abcde", "c", NULL)
Me.Parent.Currency will therefore not contain any value at the time of the call, without checking and handling you will run into a runtime error.