Sudden VB6 run-time error 48 on Windows 11

Rich Goldberg 161 Reputation points
2025-04-04T16:20:20.9066667+00:00

I have a VB6 program that I wrote years ago and update often. I use it frequently twice a year to run fundraisers for several local non-profits. The last fundraising effort ended several weeks ago (thankfully), and I have used the program daily since to view some data in my Access database.

I’m currently running Windows 11, and have been for almost a year since it first became available.

Yesterday I ran the program and out of the blue got “Run-time error ‘48’: Error in loading DLL” from VB. My variable g$ is set to

     Select * from P_SR_TBL where Sender = 'hnmccfqh' and Receiver = 'atr special'

My code is:

     Set rs = MDB.OpenRecordset(g$, dbOpenSnapshot, dbForwardOnly + dbSQLPassThrough + dbSeeChanges)

     If rs.RecordCount = 0 Then

The run-time error occurs when trying to handle rs.RecordCount.

If I open Access and create the same query, it works fine there.

So the first question is: Does this seem like it’s a VB6 issue or an interface issue?

Once that question is answered, the next question will be how to repair it. My laptop has been acting strange lately, and I wouldn’t be surprised if either VB or the interface has been corrupted. [I have had to run Microsoft 365 repair several times over the past six months, but today I found a bit of corruption in a secondary mounted disk drive that’s on the same physical drive as Windows and my programs.] So…

Should I reinstall VB6? Will software updates since the original installation disk be automatically applied?

I seem to remember that there was another product I installed that was responsible for the interface between the app and the database. Could that be the culprit? What product would that be, and where do I get the software?

 If anyone could give me advice as to the best way to get this working again with the most current (even though they’re ancient) versions of VB6 and that interface software (if it exists), I would be most grateful.

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,827 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.