VBA runtime error '48' (1 Viewer)

Wheelyjon

New member
Local time
Today, 18:53
Joined
Nov 16, 2022
Messages
5
I have an Access database that I have used for many years, but a month or so ago as soon as I try to search on the database, I get an VB runtime error '48'.
I can use the database on another machine, but my main PC locks up with this error.
I am running Access 2002 on a Windows 11 machine. A bit of an age difference, but it has always worked fine until now.
Please can anyone help
 

Wheelyjon

New member
Local time
Today, 18:53
Joined
Nov 16, 2022
Messages
5
This is not a code problem, as it works fine on other machines. I tried doing a repair on office and now when I run access I get the message Your Microsoft database or project contains a missing or broken reference to the file 'dao360.dll version 5.0
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:53
Joined
Feb 19, 2002
Messages
43,296
48 = Error in loading DLL -- didn't that give you a clue? What DLL is the code trying to use that is now missing? Start by opening any code module and going to Tools/References. Are any marked as missing?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:53
Joined
Feb 19, 2013
Messages
16,618
suspect you are running out of time to upgrade with that age difference - however your error message is telling you exactly what the problem is.

Go to the vba gui and click on tools>references - pretty sure you will see one (or more) references shown as 'missing'. Search your machine for the dao360.dll file and reselect. If you can't find it, copy from another machine. Not sure where it will be since I believe it is not used in later versions of Access but probably somewhere like C:\program files (x86)\common files\microsoft shared\dao\
 

Wheelyjon

New member
Local time
Today, 18:53
Joined
Nov 16, 2022
Messages
5
Thanks for your reply. When I go to the VBA GUI and click on tools, the references option is greyed out
You are spot on with the file location, so I ran the command
C:\>REGSVR32 \"Program Files (x86)"\"Common Files"\"Microsoft Shared"\DAO\dao360.dll
but it comes up with the error The module "program files .... failed to load ......the specified module could not be found
I checked using C:>\dir \"Program Files (x86)"\"Common Files"\"Microsoft Shared"\DAO\dao360.dll and the file is found. Not sure where I go from here.
Thanks for your help
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:53
Joined
Feb 19, 2002
Messages
43,296
If you are not seeing references, perhaps something about your user permissions has changed. Ask your IT if they made a change like this.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:53
Joined
Feb 19, 2013
Messages
16,618
There are a couple of things to try

1. is code running? - does your app have timer events?. Try opening the app by holding down the shift key before opening so it doesn't autostart a form
2. Ensure your current project is selected in the navigation windows - and not an addin or library file
3. Has it ever run successfully on a windows 11 machine?
4. Are you able to access references in another mdb on your win 11 machine?
5. I presume this is a .mdb, not a .mde?

I checked using C:>\dir \"Program Files (x86)"\"Common Files"\"Microsoft Shared"\DAO\dao360.dll
I'm not familiar with win 11 explorer, but that path looks weird
 

Gasman

Enthusiastic Amateur
Local time
Today, 18:53
Joined
Sep 21, 2011
Messages
14,314
That is my path as well
C:\Program Files (x86)\Common Files\Microsoft Shared\DAO

ignore the dir from the C:\ prompt
 

Isaac

Lifelong Learner
Local time
Today, 10:53
Joined
Mar 14, 2017
Messages
8,779
check and see (Ctrl+F) if this code exists anywhere in your VBA project:

As Database

If it does, consider changing it to as dao.database or as ado.database, as the situation warrants
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:53
Joined
May 7, 2009
Messages
19,245
you google "which" version of Office can run (reliably) on Windows 11.
 

Wheelyjon

New member
Local time
Today, 18:53
Joined
Nov 16, 2022
Messages
5
If you are not seeing references, perhaps something about your user permissions has changed. Ask your IT if they made a change like this.
There is no it dept! it is my own PC. no changes have been made except for standard windows updates.
I did try rolling back to an earlier time, I also ran sfc, but neither made any difference.
 

Users who are viewing this thread

Top Bottom