Gary_Mc_Mahon
Board Regular
- Joined
- Apr 30, 2003
- Messages
- 87
Hi,
I was wondering if anyone can help with this one....
I want to create a function that will look at a revenue period and return the revenue for that period.
E.g
If Period# = "06" then show me the reveune field "June Rev" from the query "qry_Key_Rev"
Here's as far as I've got so far...all help welcome. The reason I dotn want to do it as an IIF statement in a select query is cos i dont want to have to update the query every month.
Function FindKeyRev(Period As String) As Integer
If Period = "06" Then FindKeyRev = [qry_Key_Rev]![Jun03 Rev $]
Else
FindKeyRev = 0
End If
End Function
Cheers
Gary
I was wondering if anyone can help with this one....
I want to create a function that will look at a revenue period and return the revenue for that period.
E.g
If Period# = "06" then show me the reveune field "June Rev" from the query "qry_Key_Rev"
Here's as far as I've got so far...all help welcome. The reason I dotn want to do it as an IIF statement in a select query is cos i dont want to have to update the query every month.
Function FindKeyRev(Period As String) As Integer
If Period = "06" Then FindKeyRev = [qry_Key_Rev]![Jun03 Rev $]
Else
FindKeyRev = 0
End If
End Function
Cheers
Gary