Results 1 to 9 of 9

Thread: Why does Access lose references? [Resolved]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Resolved Why does Access lose references? [Resolved]

    We have a mix of Access 2K & 97, running on W98 & 2K.
    Somtimes Access loses references that were there the day before. While some machines seem much more prone to this than others, it's kind of a random thing. It's more common on W98 machines, but does occur on some W2K machines now & then. Most people, except developers, only have one version of Access. This is an annoying problem - easy enough to fix when it occurs, but it throws the non geeks off.
    Any ideas why this happens? Thanks.
    Last edited by salvelinus; Oct 10th, 2005 at 12:50 PM. Reason: Resolved
    Tengo mas preguntas que contestas

  2. #2
    Lively Member JustinLabenne's Avatar
    Join Date
    Jul 2005
    Location
    Ohio
    Posts
    64

    Re: Why does Access lose references?

    What kind of references are you speaking of? From Tools > References in the vbe menu?

    Opening the files in different versions will wreak havoc on applications using early binding for they upgrade well... but then re-open the file in a previous version and the reference is broken.

    Is this what your asking?
    Justin Labenne
    www.jlxl.net

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Why does Access lose references?

    Yes, the Tools>References.
    Maybe that's what's happening. Most of the apps it happens to are in Access 97, and run on W98 machines. I develop on W2K, and have Access 97 & 2K. Some people that use the apps will open the 97 file in 2K since that's all they have. But the errors don't seem to occur consistently.
    It does seem to help to dim stuff as DAO explicitly - Dim db As DAO.Database instead of Dim db As Database, for example. Most of these apps were written by someone else and I maintain & modify them. I was using VB.Net for a while, but we have a lot of old machines (think 32 mb RAM) that couldn't handle it. We're supposedly getting a new system that will require upgrades to the machines, but it's being written in Delphi.
    Tengo mas preguntas que contestas

  4. #4
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Why does Access lose references?

    you will need to disambiguate your references to DAO and ADO always use

    Dim Db As DAO.Database
    Dim Rc As DAO.Recordset
    Dim Arc As ADODB.Recordset..

    Also if using any of the other office apps like Excel or Word, switch it to Late binding instead of early binding..

    If your database was built in A2K then be aware that some functionality was not available in A97, but it should not matter the other way round as A2K is backwards compatible.

    The differences between machines will depend on the versions of DAO and ADO that the machine has installed, if possible ensure that the same version of these are available on all machines.
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Why does Access lose references?

    Thanks for the help. I'm not used to thinking of early/late binding, in VBA. For my sake, and others who don't know the difference, would you please give a few examples? I know that if you don't set a reference to DAO 3.6, for example, Intellisense doesn't pop up for that stuff. Apparently some users need it set & others don't. I've been doing it for all to make it uniform.
    AFAIK, there's no ADO used, although I think A97 is DAO bt default, A2K is ADO by default. That might be one problem, if a 2K user gets into a 97 file. Hmmm...
    Although sometimes the reference to normal stuff (Date(), e.g.) is lost.
    Tengo mas preguntas que contestas

  6. #6
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Why does Access lose references?

    The reference to normal stuff like Date() is lost due to missing references.. check the reference list for missing items, and resolve them..
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Why does Access lose references?

    Uh, yes, I realize that, and I do go and reinstall the reference.
    I'd like to avoid this problem, though.
    Tengo mas preguntas que contestas

  8. #8
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Why does Access lose references?

    A method of getting round some of the missing references is to either remove the missing references or to place the various files in the root directory of the database, and they should be picked up.. If using a client server style system then ensure the clients only have the references that they need to perform their job, if they need these additional references then register then using "regsvr32.exe" within the database startup code (Start-up form or AutoExec)
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Why does Access lose references?

    Thanks.
    Tengo mas preguntas que contestas

Posting Permissions

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



Click Here to Expand Forum to Full Width