Results 1 to 2 of 2
  1. #1
    swalsh84 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2010

    Initialization Module/Class

    I have an application that I have inherited. It works with 2007 and SQL Server 2008. I'm having trouble with some open recordsets and some of the forms that are being used. A recordset will be opened and then a "with" statement added for the form which fires off another recordset to be opened with the same name. This obviously fails.

    I have tried multiple names for the recordsets wih various errors all pointing to connections and recordsets being opened and not closed properly or closed and then being unable te reopen them. There are too many to track down at the current time.

    Access has a mind of it's own when it comes to loading forms with multiple subforms. The order of events is predictable, but I have watched it go a different route on multiple occasions when nothing significant has been changed.

    Here's my question. Is it possible to prevent any/all functions and/or subs from running until the pleasantries have been exchanged between the forms and Access? Does this make sense? Basically, I don't want anything to run until all of my forms are in proper position to actually get the data that I want to send them.


  2. #2
    llkhoutx is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2010
    Houston, Texas USA
    No, your post doesn't make sense to me.
    pleasantries have been exchanged between the forms
    is vague and ambiguous. I have no idea what that means to you.

    As for VBA recordsets, most, but not all, should be closed when finished with them in a subroutine or function. Sometimes a global recordset and database are used many many times and openening them each time adds overhead (as in a functionm call from a query). Opening them once saves that overhead.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. wia video preview class not do'n much
    By byterbit in forum Programming
    Replies: 0
    Last Post: 10-31-2011, 08:43 PM
  2. Replies: 4
    Last Post: 05-16-2011, 04:58 PM
  3. Database Project for Class
    By Dlgrondahl in forum Database Design
    Replies: 7
    Last Post: 03-31-2011, 11:54 AM
  4. Class Method
    By AndreT in forum Programming
    Replies: 3
    Last Post: 01-20-2011, 02:18 AM
  5. Class in Access
    By Huddle in forum Access
    Replies: 2
    Last Post: 07-15-2010, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums - Senior Forums