Re: Function not returning a recordset
- From: "Stuart McCall" <smccall@xxxxxxxxxxxxxxx>
- Date: Wed, 5 Dec 2007 18:03:56 -0000
"RDunlap" <RDunlap@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:12BA9A58-1CE2-44FC-9C07-4E91AA5B3567@xxxxxxxxxxxxxxxx
I'm trying to create a function that will return a recordset, but<SNIP>
everytime I
try to access the recordset, it says it is closed. ExecSP runs a stored
procedure that returns records. Here is my code:
rstSPResults.Close
Set rstSPResults = Nothing
Remove these lines from your function. When you return the recordset from
your function, what you're actually returning is a POINTER to rstSPResults,
not a NEW recordset. So if you close rstSPResults, the resulting recordset
is also closed, because it's actually the SAME recordset.
.
- Prev by Date: RE: Function not returning a recordset
- Next by Date: RE: on running mailmerge from access how to close word
- Previous by thread: RE: Function not returning a recordset
- Next by thread: RE: on running mailmerge from access how to close word
- Index(es):