Hi,
I'm nearly finished with my first acces project (very grateful for all the help I received here by the way).
I have split my database into a user interface (only forms and modules) and the real database (only tables) to allow for multiple users and easier maintenance. It works great but for one thing: I can not use the recordset.find method anymore. When I do it gives the following error: "rowset does not support scrolling backward". I have used this method quite often in my code so this is a huge setback.
I hope someone has a solution for me. I split hte database using a .udl file for the connection with readwrite|sharedenynone. I'm using access 2010 (but the error also appears in 2007). My connection code is below.
Thanks,
Jesse
unction ExecCommand(dbSQLstring As String) As ADODB.Recordset
Dim cmnd As ADODB.Command
Dim rec_set As ADODB.Recordset
Dim cnn as ADODB.Connection
Set cnn = New ADODB.Connection
cnn.Open "File Name=" & database_path & "\connection.udl"
Set cmnd = New ADODB.Command
cmnd.ActiveConnection = cnn.ConnectionString
cmnd.CommandText = dbSQLstring
Set rec_set = New ADODB.Recordset
rec_set.CursorType = adOpenDynamic
Set rec_set = cmnd.Execute
Set ExecCommand = rec_set
cnn.Close
Set cnn = Nothing
End Function
I'm nearly finished with my first acces project (very grateful for all the help I received here by the way).
I have split my database into a user interface (only forms and modules) and the real database (only tables) to allow for multiple users and easier maintenance. It works great but for one thing: I can not use the recordset.find method anymore. When I do it gives the following error: "rowset does not support scrolling backward". I have used this method quite often in my code so this is a huge setback.
I hope someone has a solution for me. I split hte database using a .udl file for the connection with readwrite|sharedenynone. I'm using access 2010 (but the error also appears in 2007). My connection code is below.
Thanks,
Jesse
unction ExecCommand(dbSQLstring As String) As ADODB.Recordset
Dim cmnd As ADODB.Command
Dim rec_set As ADODB.Recordset
Dim cnn as ADODB.Connection
Set cnn = New ADODB.Connection
cnn.Open "File Name=" & database_path & "\connection.udl"
Set cmnd = New ADODB.Command
cmnd.ActiveConnection = cnn.ConnectionString
cmnd.CommandText = dbSQLstring
Set rec_set = New ADODB.Recordset
rec_set.CursorType = adOpenDynamic
Set rec_set = cmnd.Execute
Set ExecCommand = rec_set
cnn.Close
Set cnn = Nothing
End Function