thefear
Technical User
- Mar 24, 2004
- 20
Hello!
I'll get straight to the point, and waffle on later...
Can I retrieve a value from a recordset and use that value as the function it describes?
e.g.
If the value in rsSource!BookmarkVariable was "Date", can I parse the word "Date" to give me the date, without writing my function to check the value, looking for the word "Date"?
A bit of background
I'm making a document creation/management tool. The values to be output to the document are stored in the field BookmarkVariable. Many of the values are strings - they're fine - but I'd also like to be able to flag a value as a function, (flag is stored in field BookmarkType), and have it treated as such.
I don't want to generate the Date value as part of the initial recordset because I'm trying to keep the code generic enough that new documents can be constructed from entries in the table and that it can cope with the unforseen i.e. if an end-user in the future wants to output the Time, they can just enter "Time" in BookmarkVariable and "Function" in BookmarkType - not to have to add another section to a SELECT CASE statement in the code. This would also be the case if I had to write an esoteric function for some reason - I don't want to edit my original function, I just want to be able to store its name in my Bookmark table and have it sort itself out.
Quite a bit of information for what I feel is either going to be a short 'Yes' answer, or a very short 'No' answer
Thanks for looking
I'll get straight to the point, and waffle on later...
Can I retrieve a value from a recordset and use that value as the function it describes?
e.g.
If the value in rsSource!BookmarkVariable was "Date", can I parse the word "Date" to give me the date, without writing my function to check the value, looking for the word "Date"?
A bit of background
I'm making a document creation/management tool. The values to be output to the document are stored in the field BookmarkVariable. Many of the values are strings - they're fine - but I'd also like to be able to flag a value as a function, (flag is stored in field BookmarkType), and have it treated as such.
I don't want to generate the Date value as part of the initial recordset because I'm trying to keep the code generic enough that new documents can be constructed from entries in the table and that it can cope with the unforseen i.e. if an end-user in the future wants to output the Time, they can just enter "Time" in BookmarkVariable and "Function" in BookmarkType - not to have to add another section to a SELECT CASE statement in the code. This would also be the case if I had to write an esoteric function for some reason - I don't want to edit my original function, I just want to be able to store its name in my Bookmark table and have it sort itself out.
Quite a bit of information for what I feel is either going to be a short 'Yes' answer, or a very short 'No' answer
Thanks for looking