Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Closes Automatically on Save, Intermittentl (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Sometines, when I

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Closes Automatically on Save, Intermittentl (a2k (9.0.6926) SP-

    One situation where I've seen this same behavior is when ADO and DAO are mixed, either in the same routine, or where a DAO routine calls an ADO routine, or vice versa. Could that be involved in your case?
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Closes Automatically on Save, Intermittentl (a2k (9.0.6926) SP-

    I do use both DOA (95%) & ADO (5%) sparingly. I do undersatand not to mix them, however it may be possible.

    Is there a way I can tell if I intermixed them?

    Within this troublesome time frame I added the following DAO prefixes as necessary so as not to worry about position of Microsoft DAO 3.6 Object Library Reference

    Do you see any problems?

    Thanks, John

    Dim ws As DAO.Workspace
    Dim db As DAO.Database
    Dim rs As DAO.Recordset
    Dim tdf As DAO.TableDef
    Dim qdf as DAO.QueryDef
    Dim doc as DAO.Document
    Dim fld as DAO.Field
    Dim idx As DAO.Index
    Dim prop As DAO.Property
    Dim ctr As DAO.Container
    Dim usr As DAO.User
    Dim grp As DAO.Group
    Dim rel As DAO.Relation

    ADODB
    Dim cn As New ADODB.Connection
    Dim rst As ADODB.Recordset

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Closes Automatically on Save, Intermittentl (a2k (9.0.6926) SP-

    I don't see any problem in the declarations, but I personally make it a rule to keep my DAO and ADO in separate routines and not to call one from the other. The only time I call DAO from ADO or vice versa is when the result is a value or something similar that is not affected by the object model involved. Basically, anything that returns an object of any sort has to be kept within its own object model exclusively. Specifying the object model in your declarations can prevent a LOT of problems, since there are so many objects with the same name in both models, none of which is interchangeable with the other type. It can be awfully hard to track down this kind of problem, but given your mix of ADO and DAO, I'd lay odds that's where it's coming from.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •