Rec. sets 
Author Message
 Rec. sets

I developed something in access to create a mail merge
table (later merged to word).  

When this form is loaded I do not want to populate
everything in the table .. so I created a recordset where
the letter date is within the last 2 months

Where is the best place to create this record set..
currently, I created this records set (rstLetter) in the
form load event of the main form.. but sometimes I loose
this rstLetter object when I load another form and come
backe to the main from.

Can I create the record set in any other places. so its in
the memeory till you close the main screen or quit
application.

Thanks.



Sun, 14 Aug 2005 09:44:33 GMT  
 Rec. sets
It depends on where you have declared the recordset.  If you dim it in a
proc, then it dies(goes out of scope) when the proc ends.  If you dim it to
the form, then it should live with the form.  If you dim it globally, it
should live with the entire app.

Perhaps dimming at the form level will do it for you.

Private mrstLetter as recordset 'Add prefix for ADODB or DAO

Form Load:
set mrstLetter = ...

--
HTH,

Steve Clark, Access MVP
www.FMSInc.com/Consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Total Access Admin is here!
-Prevent any new connections to the database
-Automatically disconnect idle users
-Identify Dropped or Suspect Connections
-Send Messages to Application Users
http://www.fmsinc.com/products/Admin/index.asp
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Quote:

> I developed something in access to create a mail merge
> table (later merged to word).

> When this form is loaded I do not want to populate
> everything in the table .. so I created a recordset where
> the letter date is within the last 2 months

> Where is the best place to create this record set..
> currently, I created this records set (rstLetter) in the
> form load event of the main form.. but sometimes I loose
> this rstLetter object when I load another form and come
> backe to the main from.

> Can I create the record set in any other places. so its in
> the memeory till you close the main screen or quit
> application.

> Thanks.



Mon, 15 Aug 2005 05:39:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Rec. set lost

2. changes to all records in one rec set based on position in another rec set

3. New Rec with previous Rec data

4. Perform a go to new rec w/ retaining some info from prev rec

5. Move to newrecord adds rec to db, but cant move to new rec

6. New Rec with previous Rec data

7. New Rec with Data Based on Previous Rec's Data

8. Setting up Outlook to send/rec email through Lan

9. setting focus after adding a rec

10. setting up outlook to send/rec mail through lan


 
Powered by phpBB® Forum Software © phpBB Group