PDA

Click to See Complete Forum and Search --> : Please help me with this Run-Time Error!


JEdogg
Oct 27th, 2000, 03:23 PM
I just finished packaging my new VB6.0 program that works just fine on several machines that have VB6.0 installed on them...

When I try to install it on a machine that doesn't have VB6.0 installed, When I run the program I get a Run-time error '91' (Object Variable or With block variable is not set). This occurs directly when the DAO connection to the Access2000 database is trying to perform...

I thought it might be that the dll wasn't registring properly, so I tried running regsvr32.exe "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.dll" and still had no luck.

Here is some example code:
'Open link to Access database
DBpathBudgetInfo = "C:\MLRS\mlrsdata.mdb"
Set daoDB36BudgetInfo = DBEngine(0).OpenDatabase(DBpathBudgetInfo)
Set rsBudgetInfo = daoDB36BudgetInfo.OpenRecordset("BudgetInfoTable")
Set DataBudgetInfoTable.Recordset = rsBudgetInfo

'Add all DateReqmtDue values from Requirement Table to Combo Box List
DataBudgetInfoTable.Refresh
If DataBudgetInfoTable.Recordset.EOF = False Then
DataBudgetInfoTable.Recordset.MoveFirst

Your help will be GREATLY APPRECIATED!!! Thanks for your reply

smh
Oct 27th, 2000, 03:33 PM
Try adding DAO350.dll to your package. It's located in the same folder as the DAO360.dll. This fixed my problem. Don't know why though...

smh

JEdogg
Oct 30th, 2000, 11:29 AM
Thanks for the help SMH ... it took care of my problem as well!