Gary_Mc_Mahon
Board Regular
- Joined
- Apr 30, 2003
- Messages
- 87
Hi,
I want to put a function together that will call a particular field in a query if an arguement is passed in.
Eg If I pass in the arguement "01" I want my function to pull out the field "JanRev" from the query "qry_Key_Rev".
Can ayone help me with it. I'm having real trouble. I've tried many approaches but to no avail.
Here's my latest effort.
Function KeyRev(Period As String) As Field
Dim Aug03Rev As Field
Jan03Rev = [qry_Key_Rev].[JanRev]
If Period = "01" Then
KeyRev = Jan03Rev
Else
End If
End Function
This function will only be used in the query qry_Key_Rev which is a select query.
Gary
I want to put a function together that will call a particular field in a query if an arguement is passed in.
Eg If I pass in the arguement "01" I want my function to pull out the field "JanRev" from the query "qry_Key_Rev".
Can ayone help me with it. I'm having real trouble. I've tried many approaches but to no avail.
Here's my latest effort.
Function KeyRev(Period As String) As Field
Dim Aug03Rev As Field
Jan03Rev = [qry_Key_Rev].[JanRev]
If Period = "01" Then
KeyRev = Jan03Rev
Else
End If
End Function
This function will only be used in the query qry_Key_Rev which is a select query.
Gary