I have a problem where my function is not working as I would like it to. Below is the function:
Function freedajuice(ByVal strfld As String, strcd As String, strtru As String, strfls As String) As Variant
Dim gstrfld As String
gstrfld = Forms![daily_list]![strfld]
freedajuice = IIf((gstrfld) = strcd, strtru, strfls)
End Function
I am calling it using just a normal statement in the debug window saying:
?freedajuice("List4","","",""
What the error that I keep receiving is that Microsoft Access cannot find the field referred to in your expression. Please let me know if you have any ideas.
Thanks!
Noel
Function freedajuice(ByVal strfld As String, strcd As String, strtru As String, strfls As String) As Variant
Dim gstrfld As String
gstrfld = Forms![daily_list]![strfld]
freedajuice = IIf((gstrfld) = strcd, strtru, strfls)
End Function
I am calling it using just a normal statement in the debug window saying:
?freedajuice("List4","","",""
What the error that I keep receiving is that Microsoft Access cannot find the field referred to in your expression. Please let me know if you have any ideas.
Thanks!
Noel