Results 1 to 11 of 11
  1. #1
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error message oddity (Access 2k)

    Dear All

    I've got a rather strange problem with a database I've just started to test in the 'real world'. It works fine on the PC I developed it on, and my home PC, however, when I install it on the PCs it is intended to 'live' on it gives error messages, and certain forms don't show default values in text boxes.

    Is it possible that where two different Access databases are open, with potentially different library references for VBA that this could cause a problem?

    I've checked out the hard ware side, and they are on the same network set-up as the part of the company I'm in.

    The errors only occur once per session as well, and once acknowledged allow the user to continue.

    Ian

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error message oddity (Access 2k)

    Sometimes it helps to compile the code on the target PC - open any module in the Visual Basic Editor and select Debug/Compile All Modules or Debug/Compile Project (don't know the exact caption). Compact the database after this (Tools/Database Utilities/Compact and Repair).

    If you get an error message complaining about an unknown data type, check for missing references - open any module in the Visual Basic Editor and select Tools/References... If one of the object libraries is installed in a different location or has a different version on the target PC compared to the source PC, this can cause problems with references.

    If this doesn't help, provide more details - what are the error messages, and when do they occur? When the database is opened, or when a form is opened, or ...?

  3. #3
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error message oddity (Access 2k)

    Hans

    Thanks for the suggestion, just had the offending PCs to myself for an hour and the debug compile instruction threw up an error, missing object or project when it got to a line of code witht the format instruction in it. On further investigation the PCs in question did not have teh same install of MS Office as the rest of the company, same version number etc, but different install method. Access wasn't even able to handle Date() as a query parameter. IT will be re-installing MS Office on these computers, and I'll re-try my system then.

    As a last question, can an Access MDE cause problems with .obj files? The PCs in question have an externally developed Access database on them which is heavily coded, so I'm told.

    Thanks

    Ian

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error message oddity (Access 2k)

    Ian,

    Reinstalling Office when you get missing references seems a bit drastic; often it's possible to find out where the "missing" references are installed. But if it might make things easier for you in the future, by having a more uniform set of PC's

    About MDE's: I don't have Access 2K, I'm still using 97 where I am now. In Access 97, you can't set or change references in an MDE database, so if the references are wrong, you're stuck. Can you start the Visual Basic Editor at all from an MDE? If so, can you set references, is it it greyed out?

  5. #5
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Error message oddity (Access 2k)

    In a 2000 MDE file, you can start the Visual Basic Editor by pressing Alt F11 (if the keys are available...) however, the Reference Object under Tools References is greyed out. All access to code is also unavailable.
    Regards,

    Gary
    (It's been a while!)

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error message oddity (Access 2k)

    Thanks Gary, that's what I suspected. So in any version of Access, an MDE database with missing references is toast. The designer will have to go back to the original MDB, set the correct references and make a new MDE from it.

    (A while ago, I tried to write code that checks for missing references on startup of a database, and tries to replace them by correct ones. It worked some of the time, but in many cases the code refused to work - because of the missing references! Baron von M

  7. #7
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error message oddity (Access 2k)

    Hans

    Not sure why the PCs are different. The variation is causing me other problems, oopppssss, sorry, creating other learning opportunities for me <img src=/S/grin.gif border=0 alt=grin width=15 height=15>.

    The database I'm having problems with isn't an .mde, I was curious about whether or not the .mde could have some how set the library references Access wide. Having found a few posts that refer to this issue indirectly it does not appear as though this is possible, therefore a red herring.

    The installations of Access on the culprit computers doesn't even recognise the Date() parameter. This may suggest other problems but the only idea we could come up with was to re-install Office. I'm hoping that this will sort out the problems with the missing help files on these PCs as well.

    As for Access 2k, I'm not overly impressed so far, bit of a luddite really..... <img src=/S/ranton.gif border=0 alt=ranton width=66 height=37> My main gripe is the help, when it opens it reduces the database window to the left hand half of the monitor and presents itself on the right, all very nice if you have a 21" monitor, but on my 15" it's an annoyance <img src=/S/rantoff.gif border=0 alt=rantoff width=66 height=37> me = <img src=/S/crybaby.gif border=0 alt=crybaby width=15 height=15>. My only reason for changing was the Big Boss decided we were going to 2000. As far as useability is concerned I don't see any improvement, I'm not good enough with Access to appreciate the upgrade really.

  8. #8
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error message oddity (Access 2k)

    Helen Feddema wrote several excellent articles about references in recent copies of Woody's Access Watch.

    If you use mde files, and I do so that the source code is not available, then you must test the mdb file fully before making an mde (remebering to keep the mdb file as mde files can't be edited).

    A possible solution to the original problem if all else seems to fail might be a decompile. There have been referneces to this in previous posts I think. If not try Access decompile in Google

    David Parton

  9. #9
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Error message oddity (Access 2k)

    In a recent post about this, I asked if you could set the references at startup to avoid databases not working. Charlotte mentioned that you could "reference" the reference in code. So if your machine reference is for ADO and you program in DAO, would programming such as Dim DB as DAO.DB in the beginning of your code allow the DAO programming to work or is the database really "toast" until the references are properly set. (There has got to be a work around....)

    I have run into this where the default settings on machines on our network are ADO and some of the databases don't work due to the missing DAO reference.

    If you are using Access Developer to create run time applications where access is not necessary, would you run into a similar problem when the app is used on different versions of windows or if different versions of access is installed? If I develop a runtime app in access XP, on Windows XP, would it work on say Access 97 or 2000 on a prior version of windows?

    BTW, who is Baron von M
    Regards,

    Gary
    (It's been a while!)

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error message oddity (Access 2k)

    Baron von M

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

    Re: Error message oddity (Access 2k)

    It doesn't do you any good to program something like Dim DB as DAO.Database unless you have a DAO reference set. I don't know of any way to redirect references to the basic object models. Default settings only apply to new databases created on that machine. A database with a DAO reference set will still have the DAO reference set if you copy it to another machine. The problem is that the DAO library on that machine may not be the right one. You're very likely to run into this kind of problem if you set a reference to the VBA extensibility library, because the versions for VBA 5 (A97) and VBA6 (A2k and AXP) have different names and are in different locations. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    If you are distributing a database, you need to package it and install it, with its necessary files, includding the runtime files, on the other machine to have the best chance of everything working. If you just copy the database, you're asking for trouble because no two machines are really the same. Furthermore, an AXP database will not work on a machine with only A97 or A2k installed unless you create a setup and install the necessary supporting files. There's a chance of it working on the A2k machine, but only if you have created an A2k format and not used any of the AXP-only features. Even then, it's iffy.
    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
  •