Hello All;
I have a weird situation for your review and thoughts on.
I have a db (Office/Access 2013) that is used by 5 users.
I have a VBA record write in a procedure under a Save button on a form that files data from the form into a table.
It's a split db with both components on a server.
Three of the users have no issues saving this forms data (or any other data saving issues).
Two of the users can save data in other forms, but not the form in question.
Stepping through the code, the procedure kicks out on the rs.Update line.
The error thrown is...#3049 Cannot open database. It may not be a database that yuour application recognizes, or the file may be corrupt.
In diagnosing the issue I placed a Debug.Print "Record Count: "; rs.RecordCount just after the Set rs = db.OpenRecordset(sSql) command, and on the troubled users system it does display a correct record count. That to me indicates there is no "database" or "Corrupt" file issues if their systems can read the file to count the records.
Also, the troubled users have NO issues saving data from other forms within the same instance of the db.
Given that all users are using the same db file, my thoughts lean towards a setting on their individual workstation cpu. But, given that these same troubled users have no issues saving data from multiple other forms within the db (using the same vba code lines), how could a local Windows settting allow saving with some forms but not others?
Code is as follows:
sSql = "SELECT * " & _
"FROM MyTable;"
Set db = CurrentDb
Set rs = db.OpenRecordset(sSql)
rs.MoveLast
rs.MoveFirst
Debug.Print "Record Count: "; rs.RecordCount
With rs
rs.AddNew
rs![FirstField]=(Me.FirstControl)
(etc., etc., etc.)
rs.Update
End With
rs.Close
MsgBox "Data Filed successfully !", vbOKOnly
Keep in mind that the same basic code is used for multiple other forms, for which the troubled users have no issues with.
Any thought ???
I have a weird situation for your review and thoughts on.
I have a db (Office/Access 2013) that is used by 5 users.
I have a VBA record write in a procedure under a Save button on a form that files data from the form into a table.
It's a split db with both components on a server.
Three of the users have no issues saving this forms data (or any other data saving issues).
Two of the users can save data in other forms, but not the form in question.
Stepping through the code, the procedure kicks out on the rs.Update line.
The error thrown is...#3049 Cannot open database. It may not be a database that yuour application recognizes, or the file may be corrupt.
In diagnosing the issue I placed a Debug.Print "Record Count: "; rs.RecordCount just after the Set rs = db.OpenRecordset(sSql) command, and on the troubled users system it does display a correct record count. That to me indicates there is no "database" or "Corrupt" file issues if their systems can read the file to count the records.
Also, the troubled users have NO issues saving data from other forms within the same instance of the db.
Given that all users are using the same db file, my thoughts lean towards a setting on their individual workstation cpu. But, given that these same troubled users have no issues saving data from multiple other forms within the db (using the same vba code lines), how could a local Windows settting allow saving with some forms but not others?
Code is as follows:
sSql = "SELECT * " & _
"FROM MyTable;"
Set db = CurrentDb
Set rs = db.OpenRecordset(sSql)
rs.MoveLast
rs.MoveFirst
Debug.Print "Record Count: "; rs.RecordCount
With rs
rs.AddNew
rs![FirstField]=(Me.FirstControl)
(etc., etc., etc.)
rs.Update
End With
rs.Close
MsgBox "Data Filed successfully !", vbOKOnly
Keep in mind that the same basic code is used for multiple other forms, for which the troubled users have no issues with.
Any thought ???