Hello all,
How do I get specific information from a function that I run from a query? I will pass 2 parameters to the function but I want to get some text in return.
I use this function for populating text boxes from other forms but it has the same logic structure so i would like to also use it for the query.
Anyway, how do I get information from the function back to the query (as in returning a certain value)?
Right now, the function looks like this when called from a form (Current Event).
When calling from the query, the ctrl part will not be used so I believe that I can put the Optional keyword in front of it and just the strPriority and OpenDate will be passed. I then need to return info based on what the function decides to do with that info
Example: strPriority = "Priority 2" and OpenDate = "12-20-2010"
Query runs calling that function and would return "6" (sometimes it might need to say "Immediately").
Stoss
How do I get specific information from a function that I run from a query? I will pass 2 parameters to the function but I want to get some text in return.
I use this function for populating text boxes from other forms but it has the same logic structure so i would like to also use it for the query.
Anyway, how do I get information from the function back to the query (as in returning a certain value)?
Right now, the function looks like this when called from a form (Current Event).
Code:
Function Priorities(strPriority As String, OpenDate As Date, ctrl As Control)
When calling from the query, the ctrl part will not be used so I believe that I can put the Optional keyword in front of it and just the strPriority and OpenDate will be passed. I then need to return info based on what the function decides to do with that info

Example: strPriority = "Priority 2" and OpenDate = "12-20-2010"
Query runs calling that function and would return "6" (sometimes it might need to say "Immediately").
Stoss