I have an Access 2000 database which works perfectly on my PC (Windows 98) – however when I load it onto a PC using Windows 2000 or NT I get a message saying that there are function errors and do I want to debug. I know the functions work fine – how do I tell this to the PC with Windows 2000/NT?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Functions don’t work in Windows 2000 (Access 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Functions don’t work in Windows 2000 (Access 2000)
- This topic has 21 replies, 5 voices, and was last updated 21 years, 5 months ago.
Viewing 1 reply threadAuthorReplies-
WBell
AskWoody_MVP -
WScw2
AskWoody LoungerDecember 31, 2003 at 1:47 pm #762950I tried that already – my first thoughts were that the reference libraries were not the same but I have change them.
stdole2.tlb is the only one that has a different file location on Windows 2000
c:wnttsystem32stdole2.tlb as opposed to c:windowssystemstdole2.tlb
This might explain why the database might not be able to find objects but I am not sure about functions.The other reference libraries are VBE6.dll, MSACC9.OLB, SSADO15.dll and these are all in the same location in Windows 2000 PCs
Could it have anything to do with whether it is a private function, function or public function or other?
-
WScharlotte
AskWoody Lounger -
WScharlotte
AskWoody Lounger
-
-
-
WSpatt
AskWoody Lounger -
WScw2
AskWoody Lounger -
WSHansV
AskWoody LoungerJanuary 5, 2004 at 8:24 am #764064If you select Debug | Compile (in the Visual Basic Editor, on a Win2000 machine), do you get an error message? If so:
– What is the exact message?
– What is highlighted when you click OK?
If you get a runtime error (on a Win2000 machine):
– What is the exact message?
– What is highlighted when you click Debug?(BTW, I removed the duplicate of your reply – you don’t need to repeat the same text in reply to several posts.)
-
WScw2
AskWoody LoungerJanuary 5, 2004 at 12:29 pm #764109I seem to be getting a bit closer to the solution.
The functions which do not work as far as I can tell all contain a reference to an activeX date picker control – Microsoft date and time picker, version 6.0 The file is called MSCOMCT2.OCX and in Windows 98 resides at c:/Windows/system. Since this control is not available in Windows 2000 I have replicated the directory/file structure and registered the control within access on the Windows 2000 PC.
The error message I get on the Windows 2000 PC is “runtime error 11” cannot divide by zero which suggests to me that it is unable to read the control possibly? But I don’t know how to rectify this.
An example of a rogue function is:
Public Function Per1000dateward()
‘Ctldatepickerto/from refers to an activeX control MSCOMCT2.OCX
Per1000dateward = 365 / ([Forms]![FrmWards].[CtlDatePickerTo] – [Forms]![FrmWards]![CtlDateFrom])
End Function -
WSHansV
AskWoody LoungerJanuary 5, 2004 at 12:41 pm #764111You say that you have registered mscomct2.ocx in Access, I assume that means that you have set a reference in Tools | References… But have you registered it in Windows? To do so, select Run… in the Windows Start menu, and type
regsvr32 c:windowssystem32mscomct2.ocx
then press Enter or click OK. Substitute the exact path where you put mscomct2.ocx.
-
WScw2
AskWoody LoungerJanuary 5, 2004 at 2:31 pm #764142Tried registering the MSCOMCT2.OCX control in Windows and it said it had done it successfully but this hasn’t cured the problem.
The error is saying “can’t divide by zero. On opening the form the control defaults to todays date and time. According to the function this would indeed give a zero reading i.e. today- today = 0
To get round this I have tried changing the default date value of the control but it doesn’t seem to want to stick. Besides, the value is the same as that on the Windows 98 PC which works fine.
Any other ideas – I feel we are getting close.
-
WSHansV
AskWoody Lounger -
WScw2
AskWoody LoungerJanuary 6, 2004 at 9:04 am #764432Problem solved…I think. The function which relates to a query which provides the detail for a subform meant that the subform could not work because on opening the main form the dates were exactly the same hence the “can’t divide by zero” message. I have no explanation as to why the exact same function works on one operating system and not the other. One of those many unsolved microsoft mysteries I guess. Thanks everyone for your suggestions.
Oh yes the work around was simply to put +1 next to one of the control references in the function. (with the data I am using this doesn’t distort the outcome).
-
WScw2
AskWoody LoungerJanuary 6, 2004 at 9:04 am #764433Problem solved…I think. The function which relates to a query which provides the detail for a subform meant that the subform could not work because on opening the main form the dates were exactly the same hence the “can’t divide by zero” message. I have no explanation as to why the exact same function works on one operating system and not the other. One of those many unsolved microsoft mysteries I guess. Thanks everyone for your suggestions.
Oh yes the work around was simply to put +1 next to one of the control references in the function. (with the data I am using this doesn’t distort the outcome).
-
WSHansV
AskWoody Lounger -
WScw2
AskWoody LoungerJanuary 5, 2004 at 2:31 pm #764143Tried registering the MSCOMCT2.OCX control in Windows and it said it had done it successfully but this hasn’t cured the problem.
The error is saying “can’t divide by zero. On opening the form the control defaults to todays date and time. According to the function this would indeed give a zero reading i.e. today- today = 0
To get round this I have tried changing the default date value of the control but it doesn’t seem to want to stick. Besides, the value is the same as that on the Windows 98 PC which works fine.
Any other ideas – I feel we are getting close.
-
WSHansV
AskWoody LoungerJanuary 5, 2004 at 12:41 pm #764112You say that you have registered mscomct2.ocx in Access, I assume that means that you have set a reference in Tools | References… But have you registered it in Windows? To do so, select Run… in the Windows Start menu, and type
regsvr32 c:windowssystem32mscomct2.ocx
then press Enter or click OK. Substitute the exact path where you put mscomct2.ocx.
-
WScharlotte
AskWoody Lounger -
WScharlotte
AskWoody Lounger
-
-
WScw2
AskWoody LoungerJanuary 5, 2004 at 12:29 pm #764110I seem to be getting a bit closer to the solution.
The functions which do not work as far as I can tell all contain a reference to an activeX date picker control – Microsoft date and time picker, version 6.0 The file is called MSCOMCT2.OCX and in Windows 98 resides at c:/Windows/system. Since this control is not available in Windows 2000 I have replicated the directory/file structure and registered the control within access on the Windows 2000 PC.
The error message I get on the Windows 2000 PC is “runtime error 11” cannot divide by zero which suggests to me that it is unable to read the control possibly? But I don’t know how to rectify this.
An example of a rogue function is:
Public Function Per1000dateward()
‘Ctldatepickerto/from refers to an activeX control MSCOMCT2.OCX
Per1000dateward = 365 / ([Forms]![FrmWards].[CtlDatePickerTo] – [Forms]![FrmWards]![CtlDateFrom])
End Function
-
-
WSHansV
AskWoody LoungerJanuary 5, 2004 at 8:24 am #764065If you select Debug | Compile (in the Visual Basic Editor, on a Win2000 machine), do you get an error message? If so:
– What is the exact message?
– What is highlighted when you click OK?
If you get a runtime error (on a Win2000 machine):
– What is the exact message?
– What is highlighted when you click Debug?(BTW, I removed the duplicate of your reply – you don’t need to repeat the same text in reply to several posts.)
-
-
WScw2
AskWoody Lounger
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
I set up passkeys for my Microsoft account
by
Lance Whitney
3 hours, 40 minutes ago -
AI is for everyone
by
Peter Deegan
3 hours, 41 minutes ago -
Terabyte update 2025
by
Will Fastie
3 hours, 42 minutes ago -
Migrating from Windows 10 to Windows 11
by
Susan Bradley
4 hours, 3 minutes ago -
Lost sound after the upgrade to 24H2?
by
Susan Bradley
13 hours, 45 minutes ago -
How to move 10GB of data in C:\ProgramData\Package Cache ?
by
Alex5723
2 hours, 15 minutes ago -
Plugged in 24-7
by
CWBillow
22 hours, 1 minute ago -
Netflix, Apple, BofA websites hijacked with fake help-desk numbers
by
Nibbled To Death By Ducks
1 day, 2 hours ago -
Have Copilot there but not taking over the screen in Word
by
CWBillow
1 day ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
2 days, 18 hours ago -
Are Macs immune?
by
Susan Bradley
16 hours, 5 minutes ago -
HP Envy and the Function keys
by
CWBillow
2 days, 1 hour ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
5 hours, 35 minutes ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
3 days, 5 hours ago -
Unable to update to version 22h2
by
04om
13 hours, 48 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
3 days, 13 hours ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
3 days, 13 hours ago -
Very Quarrelsome Taskbar!
by
CWBillow
2 days, 22 hours ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
4 days, 2 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
3 days, 14 hours ago -
Is your battery draining?
by
Susan Bradley
14 hours, 25 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
14 hours, 26 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
4 days, 5 hours ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
8 hours, 11 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
3 days, 14 hours ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
3 days, 6 hours ago -
National scam day
by
Susan Bradley
2 days, 13 hours ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
3 days, 9 hours ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
5 days, 6 hours ago -
Tools to support internet discussions
by
Kathy Stevens
3 days, 19 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.