I have created an Access 2010 database with linked tables on SQL-server. Buttons on the main form call stored procedures that enable users to add data from their respective source files, mainly Excel tables. The development of stored procedures and triggers has been outsourced.
The database has been rolled out in different locations/countries. To improve performance and to prevent users from getting access to data from locations other than their own management has decided for an update of the database. The developing company has now come up with the following: The database will be split into different schemas, each location will get his own schema. The selection of the schema will be based on the location of the user’s region as defined in properties on ActiveDirectory. I can store this location in a public variable.
To create the links to tables on SQL-server I have used the Access built-in wizard. A connection to a table is at the moment now described as something like: ODBC;Description=NETWPROD;Driver=SQL Server;Server=CCMDB11,cc.acme.corp;Trusted connection=Yes;app=Microsoft Office 2010;Database=1PRD;table=dbo.1PRD_Compliances
My questions to you is the following:
Is it possible to add a property like ‘SCHEMA=no’ in the tables description. And if yes, how do I add this using Access VBA.
Or
How do redirect the user to the correct location based schema at log-in using Access VBA?
Or How do I redirect the user to the correct views on SQL-server, the view having filtered the data on relevant location.
Any help is greatly appreciated.