cheuschober
Muse of Fire
- Local time
- Today, 07:32
- Joined
- Oct 25, 2004
- Messages
- 168
So this may seem like a bit of an odd duck question but I've about 20 or so fields in a certain query that all require a certain set of calculations (all of which are related).
What I'd like to is extract the field name of one of my arguments as a string and use it as a criterion for how the function operates instead of creation 20 different functions that all do nearly the same thing.
I'm not completely sure that access could even /do/ this but thought I'd try.
Ex: Func([Start_After_Days])
Where 'msgbox strArgName' would return Start_After_Days
Any thoughts? I can't use .Name (at least I don't think I can--might be misusing it, I guess). I know I could recordset it using the same query this function will be used in as a sql statement and retrieve it that way, but that seems like the long way around and frankly a bit resource expensive (as the number of calculations that need to be done grow quite large near the end of this set of functions).
Thanks in advance,
~Chad (Vb wannabee)
Edit: Just ran across something mentioning Get Property() Anyone know if this is a false lead?
What I'd like to is extract the field name of one of my arguments as a string and use it as a criterion for how the function operates instead of creation 20 different functions that all do nearly the same thing.
I'm not completely sure that access could even /do/ this but thought I'd try.
Ex: Func([Start_After_Days])
Code:
Public Function Func(Arg1 As Integer) as Date
Dim strArgName As string
???
Where 'msgbox strArgName' would return Start_After_Days
Any thoughts? I can't use .Name (at least I don't think I can--might be misusing it, I guess). I know I could recordset it using the same query this function will be used in as a sql statement and retrieve it that way, but that seems like the long way around and frankly a bit resource expensive (as the number of calculations that need to be done grow quite large near the end of this set of functions).
Thanks in advance,
~Chad (Vb wannabee)
Edit: Just ran across something mentioning Get Property() Anyone know if this is a false lead?
Last edited: