I am trying to use a function in an Access query.
Here is the code in the Module:
Code:
Public Function DeriveStatus(Delivery_DT, Billing_Doc_DT, Order_Qty, Confirmed_Qty)
If [Delivery_DT] <> 0 Then
DeriveStatus = "Delivered"
Else
If [Billing_Doc_DT] <> 0 Then
DeriveStatus = "Invoiced"
Else
DeriveStatus = "NOT Confirmed"
End If
End If
End Function
It is invoked in a query field as follows:
Order Status: DeriveStatus([Delivery_DT],[Billing_Doc_DT],[Order_Qty],[Confirmed_Qty])
When trying to run it, it error with: Undefined functin "DeriveStatus" in expression.
Could someone please help me? I am just starting to work on Access.
I followed a thread that mentioned Utility.mda (uncheck it, I think, but I followed the paths suggested and there is no such entry in the references.
Thank you very much!!
GV