The following code was working fine until I installed the application on the users machine. I changed the provider info to ref Jet 4.0 and nothing else that I know of. I have the same code working in the same application only looking at a different table. It works fine. I have tried to do a line by line comparison but nothing sticks out. Can someone tell me what I am missing?
The error message that I receive is Run-time erroe '-2147467259(80004005)':
Methos 'Open' of object'_Recordse' failed
The debug points to adoPrimaryRS.Open ....
The code is as follows:
**************************
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Quality\EmployeeInfo.mdb;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select ErrorDate, IDNUM, ErrorType, ErrorQuantity, External, TR, Comments, ErrorMonth, ErrorYear from ErrorInfo Order by ErrorDate ", db, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
Dim oCheck As CheckBox
'Bind the check boxes to the data provider
For Each oCheck In Me.chkFields
Set oCheck.DataSource = adoPrimaryRS
Next
mbDataChanged = False
End Sub
*******************
Any and all help is appreciated
David
The error message that I receive is Run-time erroe '-2147467259(80004005)':
Methos 'Open' of object'_Recordse' failed
The debug points to adoPrimaryRS.Open ....
The code is as follows:
**************************
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Quality\EmployeeInfo.mdb;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select ErrorDate, IDNUM, ErrorType, ErrorQuantity, External, TR, Comments, ErrorMonth, ErrorYear from ErrorInfo Order by ErrorDate ", db, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
Dim oCheck As CheckBox
'Bind the check boxes to the data provider
For Each oCheck In Me.chkFields
Set oCheck.DataSource = adoPrimaryRS
Next
mbDataChanged = False
End Sub
*******************
Any and all help is appreciated
David