Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that queries an access database, and would like to turn
it into a user-defined function. The recordset that is returned should always be one value only. I am stuck at this place in my code: rst.Open SQLstr, conn Range("C1").CopyFromRecordset rst It works now, returning the value to Range("C1") on the worksheet. How do I assign the query result to a function value? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
either of these espressions will give you the value
rst.getstring rst.fields(0).value "Steve" wrote: I have a macro that queries an access database, and would like to turn it into a user-defined function. The recordset that is returned should always be one value only. I am stuck at this place in my code: rst.Open SQLstr, conn Range("C1").CopyFromRecordset rst It works now, returning the value to Range("C1") on the worksheet. How do I assign the query result to a function value? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Beautiful, it works. Thanks.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert $ to actual numbers in an imported web query | Excel Discussion (Misc queries) | |||
Convert hard coded query criteria to Parameter Query | Excel Discussion (Misc queries) | |||
Convert integer to time query | Excel Discussion (Misc queries) | |||
Microsoft Query rejects "nz" function in Access Query | Excel Discussion (Misc queries) | |||
Convert to a Parameter Query | Excel Programming |