Solved

Access 2K Runtime and Date() not working together?

Posted on 2001-09-04
15
230 Views
Last Modified: 2008-02-01
First I would like to start by saying thank you to all the help everyone has been giving me with this. I immensely appreciate it. This is a rather big project for me and this is the last thing I need to get fixed on the program.

I gave the Now() ideas a try and unfortunately it?s producing the same error. Thank you for suggesting it though as it was well worth the shot. - Thanks.

I am very interested in the notion that a bad reference could be causing the problem though. On a couple of the machines I got an error message Class not registered when the splash form opened. So I did some checking and sure enough there is a reference to Microsoft Forms 2.0 Object Library which is not getting shipped with the program. I tried removing it but got a message saying Can?t remove control or reference; in use. The thing is I went through all 75 forms and 43 reports and couldn?t find a single control that should be using this library.

Does anyone know what I can do to locate the culprit so that I can remove the reference? I have feeling it will fix the problem. Thank you in advance.

The Royal Falcon
0
Comment
Question by:TheRoyalFalcon
  • 5
  • 3
  • 2
  • +5
15 Comments
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6454133
I have had problems with the Date function also.  Try using Now(), it usually works for me though Im not sure why!
0
 
LVL 2

Expert Comment

by:Gudare
ID: 6454260
Test to see if the text functions (IE: Right/Left/Mid) are behaving the same, I believe they're part of the same library.

I've seen this happen on multi-system distributions of standard db's, but never in a runtime, because it's supposed to distribute the libraries with it...

-Craig
0
 
LVL 4

Expert Comment

by:abaldwin
ID: 6454268
Try running any service packs for Office 2k that are available from the MS site.

I believe this will update the mscomm32.ocx which I think is your problem.

If you take  mscomm32.ocx and mscomm32.oca and place them on the boxes that fail this will let you know that they are the problem.

Of course back theirs up before doing so.

Andy
0
 
LVL 57
ID: 6454503
"I would like to correct the problem but I dont know why the function isnt working. Does anyone know
what I can do to correct the problem? Or why it is even happening?"

 It's a broken reference.  One of the libs your using has a different version number then the one one the user PC, but the one distrbuted is older then, so it was not overwritten.

 You need to include code in the app to check for broken references and recompile the app if need be.  You can only do this with a MDB format.  If it's MDE, then you need to distribute will all type libs, register them, and place them in the directory with the MDE.  THis needs to be done because a MDE cannot be compiled.

See the code in the following MSKB article:

http://support.microsoft.com/support/kb/articles/Q194/3/74.ASP

Jim.
0
 
LVL 4

Expert Comment

by:abaldwin
ID: 6454518
Have you tried replacing their mscomm32.oca and mscomm32.ocx with the files on your box????

If that fixes it then I do believe that they need office services pack on their box.

Andy
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6454799
I agree with Jim on the references.

Additional tip:
Remove all references that aren't necessary before moving your application to another PC.
Just uncheck and do a compile all modules to see or the code is still OK. If not, check the library.

Access has a habit of adding a library when placing e.g. an .ocx, but not removing it when you remove the object...

Nic;o)
0
 
LVL 1

Author Comment

by:TheRoyalFalcon
ID: 6458305
First I would like to start by saying thank you to all the help everyone has been giving me with this. I immensely appreciate it. This is a rather big project for me and this is the last thing I need to get fixed on the program.

I gave the Now() ideas a try and unfortunately it?s producing the same error. Thank you for suggesting it though as it was well worth the shot. - Thanks.

I am very interested in the notion that a bad reference could be causing the problem though. On a couple of the machines I got an error message ?Class not registered? when the splash form opened. So I did some checking and sure enough there is a reference to ?Microsoft Forms 2.0 Object Library? which is not getting shipped with the program. I tried removing it but got a message saying ?Can?t remove control or reference; in use?. The thing is I went through all 75 forms and 43 reports and couldn?t find a single control that should be using this library.

Does anyone know what I can do to locate the culprit so that I can remove the reference? I have a feeling it will fix the problem. Thank you in advance.

The Royal Falcon
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 57
ID: 6458446
Close Access.

Re-open, open the MDB without executing anything.  Open a module in design view and uncheck the reference.

If you can do that, then try compiling the app and see if any errors result.  If not, then you have a form or control that's built on that class lib.

Jim.
0
 
LVL 1

Author Comment

by:TheRoyalFalcon
ID: 6458575
Thanks Jim,

I gave it a try but I still can't uncheck it. Do you have any idea how I can list all the control using a class to the imediate window? Thanks.

Steve

0
 
LVL 1

Author Comment

by:TheRoyalFalcon
ID: 6458580
Thanks Jim,

I gave it a try but I still can't uncheck it. Do you have any idea how I can list all the control using a class to the imediate window? Thanks.

Steve

0
 
LVL 1

Author Comment

by:TheRoyalFalcon
ID: 6459651
I find myself still at a loss for the date problem on my reports. I was able to remove the reference to the mentioned library with a little work but even after all that I am still getting the same error on all the reports (although the splash screen error did go away).

The only thing I can think of doing is passing the value to a control using the on print event but that means touching more than 40 reports. If any of you have alternative ideas please let me know. (I still wish I could locate the cause of this.) Thank you.

0
 
LVL 57
ID: 6460426
OK. Do the following:

1. Backup
2. Start Access/MDB with /decompile:

  C:\..\MSACCESS.EXE /DECOMPILE C:\....\myMDB.MDB

3. Open a module in design mode
4. Click tools/ references
5. Uncheck one (note which)
6. Close the MDB and Access
7. Reopen and recheck the same reference.
8. Note if any are listed as "MISSING" or "BROKEN" (if so you need to figure out why).
9. Now compile.  You should not get any errors.

  Now do you still get the error running reports?

Let me know,
Jim.
0
 
LVL 1

Author Comment

by:TheRoyalFalcon
ID: 6602098
Hi Everyone,

I tried to delete this question a while back and I see now that it never showed up? Incase it didn't and no one saw my posting on this, I found out what was causing the problem. It had to do with MDAC versions. Here is a link to a document at my site explaining the solution. Have a nice day.


http://www.ironcube.com/downloads/developers/datefunctionfix.doc

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7088543
Hi TheRoyalFalcon,
You've requested to delete this question, but its status has remained as 'Pending Delete' because one or more comments have been added.  Normally, the only way to fully delete such a Question is to post a message to Community Support and ask for assistance.

EE is making a one-time database sweep to purge the Pending Delete Questions automatically.  During this sweep:

    TheRoyalFalcon -- To allow the deletion to proceed:  Do nothing.
    EXPERTS -- Please DON'T POST a comment except to contest this deletion.

In the future, please refer to http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp#8 for instruction on deleting questions.

DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 7114474
50 points refunded, item moved to our PAQ at zero points and closed rather than deleteing, since Asker posted solution a well.
Moondancer - EE Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now