Hi,
Has anyone ever experienced this error?
I did some searching prior to making this post, and this error is not trappable.
Here's my setup.
I have a main form that is unbounded. In the form, I have a subform, it is a datasheet form.
I realize that you cannot connect a datasheet subform with an unbounded parent form.
So my workaround has been to retrieve a recordset of my data, set it to the datasheet form's recordset. Everything works fine. Obviously, I had to do some manual plumbing in the form of writing VBA to insert a new, blank record in order to have an additional row for data entry that would otherwise be automatic when using bounded datasheet forms.
Anyways, here's the problem:
As mentioned above, it all works fine. However, when I point the mouse outside of the application, as in clicking on the desktop, Access starts throwing up an error, Data provider could not be initialized.
Access continues to pop up the same error repeatedly, until finally it shuts itself down automatically.
Additional Info:
The recordset is retrieved via ADODB.
In VBA Help, it states that adUseClient has only the adOpenStatic CursorType available, but I'm not fully understanding the ramification of that because it works with the recordset setup I have above. Could my recordset configuration be the cause of the problem?
My connection string for the ADODB connection object is as follows (MS SQL Server back end):
If anyone has an suggestions for a fix, I would greatly appreciate it.
Again, the application works fine. The error only pops up when the application loses focus, which happens when I click outside of the application, as in the desktop or another window that is not the application.
Regards.
Has anyone ever experienced this error?
I did some searching prior to making this post, and this error is not trappable.
Here's my setup.
I have a main form that is unbounded. In the form, I have a subform, it is a datasheet form.
I realize that you cannot connect a datasheet subform with an unbounded parent form.
So my workaround has been to retrieve a recordset of my data, set it to the datasheet form's recordset. Everything works fine. Obviously, I had to do some manual plumbing in the form of writing VBA to insert a new, blank record in order to have an additional row for data entry that would otherwise be automatic when using bounded datasheet forms.
Anyways, here's the problem:
As mentioned above, it all works fine. However, when I point the mouse outside of the application, as in clicking on the desktop, Access starts throwing up an error, Data provider could not be initialized.
Access continues to pop up the same error repeatedly, until finally it shuts itself down automatically.
Additional Info:
The recordset is retrieved via ADODB.
Code:
CursorLocation = adUseClient
CursorType = adOpenKeyset
LockType = adLockOptimistic
My connection string for the ADODB connection object is as follows (MS SQL Server back end):
Code:
getConnectionString = "Driver={SQL Server};" & _
"Server=" & SRVR_NAME & ";" & _
"Database=" & DB_NAME & ";" & _
"Uid=" & LOGIN & ";" & _
"Pwd=" & PASS & ";"
If anyone has an suggestions for a fix, I would greatly appreciate it.
Again, the application works fine. The error only pops up when the application loses focus, which happens when I click outside of the application, as in the desktop or another window that is not the application.
Regards.