I have just moved to Access 2003. I am designing a database as a single user.
All the problems described below occur when I run code from a module.
Problem 1:
Opening the database by double clicking the file in Explorer works fine until I start my code. It stops on the ‘Set dbs = OpenDatabase(“DbName”)’ statement because it could not find the file. I can modify forms, reports, tables, no problem there.
Problems 2 to n:
Opening the file from Access gives me a great choice of different errors and warnings !
Run-time error ‘3734’
‘The database has been placed in a state by user ‘Admin’ on machine ‘XXXXXX’ that prevents it from being opened or locked.'
Which means I cannot run my code.
This one is generally cured by closing and reopening the database (not always).
So now I can modify and test the code. I try to save it.
Message:
‘Microsoft Office Access can’t save design changes or save to a new database object because another user has the file open. To save your design changes or to save to a new object, you must have exclusive access to the file.’
Which means I cannot save my work.
Or:
‘You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later.’
More help on this one:
‘When attempting to open a database object in Design view, you may encounter this error message. This occurs because Access requires an exclusive lock to the database for some object types since other users may attempt to use the objects. If you change the name of a table, or its definition of fields while someone has the table open, this will result in a serious error for the other user. Therefore, you must acquire sole access to the database while you attempt to update the object. When you release control of the object, other users will be allowed to use the database (release your exclusive lock).’
I am the sole user. So I reopen the database in exclusive mode. No problem modifying the design of objects. Back to running the code:
‘Run-time error ‘3045’:
Could not use ‘DbName’; file already in use’
Next paragraph on the same warning:
'It is recommended you implement source code control for development efforts by using the Microsoft Visual SourceSafe Add-in for Microsoft Office Access. As an alternative you could distribute local working copies of the database to each developer.'
I have installed the add-in, but it requires the full Visual SourceSafe package (in the $500 price range). Anyhow, programmatically, it is beyond my knowledge.
The occurring of the errors is erratic, there is no pattern. It looks like that at some stage, Access decides to add a new user and give him all the rights.
In ‘Tools/Security/Users and Groups Accounts’, there is only one user (Admin), ironically, the one who throws me out!
A few things I have tried
- Imported all the objects and modules to a blank database
- Split the database with the tables file in the same directory as the front end (eventually, the goal is to put the data on the network)
- Installed Access 2003 on another machine, ran it from there
- In ‘Tools/Security, created a workgroup ID file (.mdw) with the User-Level Security wizard, in the same directory and with the same name as the ‘.mdb’ file. Option default workgroup file. Desecured all the objects. Included ‘Full permissions’ group in the workgroup. Granted ALL the permissions to the Users group. It made things worse. However, after I deleted the ‘.mdw’ file and rebooted my machine, Access worked fine. OUFFF, until I quit and restarted. Back to square one.
- Started the database from the ‘Samples’ directory in \Program files\Microsoft Office. After all, the Northwind database is running smoothly (you have to be really desperate to try that sort of thing).
- Converted the database to Access 2000 format.
All that to no avail.
I have ran out of ideas (and of steam). I am afraid to loose several weeks of work. If someone had THE solution, he would deserve 4 stars, at least.
All the problems described below occur when I run code from a module.
Problem 1:
Opening the database by double clicking the file in Explorer works fine until I start my code. It stops on the ‘Set dbs = OpenDatabase(“DbName”)’ statement because it could not find the file. I can modify forms, reports, tables, no problem there.
Problems 2 to n:
Opening the file from Access gives me a great choice of different errors and warnings !
Run-time error ‘3734’
‘The database has been placed in a state by user ‘Admin’ on machine ‘XXXXXX’ that prevents it from being opened or locked.'
Which means I cannot run my code.
This one is generally cured by closing and reopening the database (not always).
So now I can modify and test the code. I try to save it.
Message:
‘Microsoft Office Access can’t save design changes or save to a new database object because another user has the file open. To save your design changes or to save to a new object, you must have exclusive access to the file.’
Which means I cannot save my work.
Or:
‘You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later.’
More help on this one:
‘When attempting to open a database object in Design view, you may encounter this error message. This occurs because Access requires an exclusive lock to the database for some object types since other users may attempt to use the objects. If you change the name of a table, or its definition of fields while someone has the table open, this will result in a serious error for the other user. Therefore, you must acquire sole access to the database while you attempt to update the object. When you release control of the object, other users will be allowed to use the database (release your exclusive lock).’
I am the sole user. So I reopen the database in exclusive mode. No problem modifying the design of objects. Back to running the code:
‘Run-time error ‘3045’:
Could not use ‘DbName’; file already in use’
Next paragraph on the same warning:
'It is recommended you implement source code control for development efforts by using the Microsoft Visual SourceSafe Add-in for Microsoft Office Access. As an alternative you could distribute local working copies of the database to each developer.'
I have installed the add-in, but it requires the full Visual SourceSafe package (in the $500 price range). Anyhow, programmatically, it is beyond my knowledge.
The occurring of the errors is erratic, there is no pattern. It looks like that at some stage, Access decides to add a new user and give him all the rights.
In ‘Tools/Security/Users and Groups Accounts’, there is only one user (Admin), ironically, the one who throws me out!
A few things I have tried
- Imported all the objects and modules to a blank database
- Split the database with the tables file in the same directory as the front end (eventually, the goal is to put the data on the network)
- Installed Access 2003 on another machine, ran it from there
- In ‘Tools/Security, created a workgroup ID file (.mdw) with the User-Level Security wizard, in the same directory and with the same name as the ‘.mdb’ file. Option default workgroup file. Desecured all the objects. Included ‘Full permissions’ group in the workgroup. Granted ALL the permissions to the Users group. It made things worse. However, after I deleted the ‘.mdw’ file and rebooted my machine, Access worked fine. OUFFF, until I quit and restarted. Back to square one.
- Started the database from the ‘Samples’ directory in \Program files\Microsoft Office. After all, the Northwind database is running smoothly (you have to be really desperate to try that sort of thing).
- Converted the database to Access 2000 format.
All that to no avail.
I have ran out of ideas (and of steam). I am afraid to loose several weeks of work. If someone had THE solution, he would deserve 4 stars, at least.