PDA

View Full Version : Security and Export issues



gsanghvi20
08-13-2008, 09:38 AM
Hi,

I have created an application using access that uses a database in the backend. Now, I have 2 issues:

1. How do I enforce security, i.e. I want that no one can delete the database but can just update/delete/add records from the database.
2. Is there a way where I can populate an excel sheet and export it to the access database so that the database is updated.

Thanks,
gsanghvi20

OBP
08-13-2008, 09:45 AM
The only way that you can prevent deletion of the database is in the Folder Properties, it isn't anything to do with Access.
You can "Import" an Excel Worksheet and Add it to your tables or Update your Table if the Records already exist.
There are quite a few Threads on that subject already on this Forum.
Advanced Search for Violette lephan.

CreganTur
08-13-2008, 09:47 AM
Is there a way where I can populate an excel sheet and export it to the access database so that the database is updated.

Are you wanting to import the data from your Excel Spreadsheet into an exisitng table in your database?

gsanghvi20
08-13-2008, 10:53 AM
Yeah. I want to import the data from your Excel Spreadsheet into an existing table in my database

CreganTur
08-13-2008, 11:00 AM
Take a look at this example database. It uses a File Dialog window for the User to select workbooks. Then it will evaluate the fields in the workbook, and if they match it will create a linked table with the workbook. Then it will run an Update query to pull data from the linked workbook into an existing table, and then release the linked table. It has capabilities to allow selection of multiple workbooks, and can evaluate every worksheet in every workbook.

The example contains an example workbook.

HTH:thumb

gsanghvi20
08-13-2008, 12:34 PM
Thanks. But on running this I get an error (see attachment) :think:
And the excel sheet is not even open as said in the error.

CreganTur
08-13-2008, 12:44 PM
Are you sure that the excel file isn't already opened or being used by something else?

I don't have 2007 at work, but I can test it out at home later tonight and see if I can find a reason why it's not working for you.

But, for now I suggest trying one of two things:
1) copy the data out of the Excel spreadsheet and create a new spreadsheet with the copied data
2) take a look at the code in the database and see if you can get it to work for you in your database. It's fully commented, so you should be able to see what you need to change.