R
rael_lucid
Hi,
Subject is extremely vague, let me explain:
Have a table with the following fields:
ItemID (Pkey)
Price1
Price2
....
Price 10
I have some code which is used to retrieve a specific price for a specific
item. The price returned is dependent on user input. ie: The user will
request "Price1", or "Price7" etc
Is it possible in VBA to retrieve the requested field using code similar to
the following:
Function GetPrice(ItemID as long) as Double
....
rsTemp.Open "SELECT * FROM ItemPrices WHERE ItemID = " & {User Entered},
CurrentProject.Connection
....
GetPrice = rsTemp! & {String Variable} ******* THIS IS THE LINE
OF CONCERN
....
End Function
Hopefully that is enough info to advise. Let me know if you need more.
Thanks
Rael
Subject is extremely vague, let me explain:
Have a table with the following fields:
ItemID (Pkey)
Price1
Price2
....
Price 10
I have some code which is used to retrieve a specific price for a specific
item. The price returned is dependent on user input. ie: The user will
request "Price1", or "Price7" etc
Is it possible in VBA to retrieve the requested field using code similar to
the following:
Function GetPrice(ItemID as long) as Double
....
rsTemp.Open "SELECT * FROM ItemPrices WHERE ItemID = " & {User Entered},
CurrentProject.Connection
....
GetPrice = rsTemp! & {String Variable} ******* THIS IS THE LINE
OF CONCERN
....
End Function
Hopefully that is enough info to advise. Let me know if you need more.
Thanks
Rael