I wrote a program that is now being installed on over 100 machines off site. it works fine on most machines but a few people have encountered "Run-Timer Error 91: Object Variable or With block variable not set." upon opening a form that contains a dbgrid control.
This program uses DAO and has a MS Access database as the back-end.
the dbgrid control has a datacontrol as its datasource. The datacontrols recordsource is set in the Form_Load event.
Private Sub Form_Load()
set data1.recordset=dbs.openrecordset("select [chaptercode], chapter order by chapter;")
(note: i added the data1.refresh line before referencing the the recordset per sugguestion in a MS Knowledge base article but the person is still getting teh Run-Time 91 Error)
After receiveing the error, the form opens with no data in the dbgrid.
In previous instances of this problem, the user simply needed to install a newer version of MDAC. However, even after intalling the correct version of MDAC a few people still get this error and the form opens with no data in the dbgrid control.