Rabu, 05 Oktober 2011

Re: [AccessDevelopers] Re: Access Restriction

 

Giorgio,

Here is the vb code that I use to copy the form to another database. You can use the same code for each of the objects like queries and reports.  It used to be a macro because my boss only uses them and not vba so I converted it.

Function mcrCopyMainForm()
On Error GoTo mcrCopyMainForm_Err

    DoCmd.SetWarnings False
    ' D0802 - HVAC
    DoCmd.CopyObject "S:\Employee Label Database\HVAC\D0802 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0803 - CENTRAL PLANT
    DoCmd.CopyObject "S:\Employee Label Database\Central Plant\D0803 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0804 - CARPENTRY SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Carpentry Services\D0804 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0806 - ELECTRICAL SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Electrical Services\D0806 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0808 - GROUNDS SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Grounds Services\D0808 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0809 - MOVING AND EVENTS
    DoCmd.CopyObject "S:\Employee Label Database\Moving and Events Services\D0809 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0810 - LOCK SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Lock Services\D0810 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0811 - PLUMBING SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Plumbing Services\D0811 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0813 - PAINT SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Paint Services\D0813 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0816 - BUILDING AUTOMATIONV
    DoCmd.CopyObject "S:\Employee Label Database\Building Automation Systems\D0816 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0819 - ENHANCED BLDG MAINT
    DoCmd.CopyObject "S:\Employee Label Database\Enhanced Bldg Maint Program\D0819 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0823 - SIGN SERVICES
    DoCmd.CopyObject "S:\Employee Label Database\Sign Services\D0823 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0831 - MAINTENANCE AND REPAIR
    DoCmd.CopyObject "S:\Employee Label Database\Maintenance Repair 2nd Shift\D0831 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0835 - FM CONSTRUCTION TEAM
    DoCmd.CopyObject "S:\Employee Label Database\FM Construction Team\D0835 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D0838 - FM FIRE TECH TEAM
    DoCmd.CopyObject "S:\Employee Label Database\Fire Tech Services\D0838 Label Database.accdb", "", acForm, "frmPrintLabels"
    ' D08All
    DoCmd.CopyObject "S:\Employee Label Database\All Services\D08All Label Database.accdb", "", acForm, "frmPrintLabels"
    DoCmd.SetWarnings True


mcrCopyMainForm_Exit:
    Exit Function

mcrCopyMainForm_Err:
    MsgBox Error$
    Resume mcrCopyMainForm_Exit

End Function
 
Jim Wagner


From: GiorgioR <giorgio_rovelli@virgilio.it>
To: AccessDevelopers@yahoogroups.com
Sent: Wednesday, October 5, 2011 9:32 AM
Subject: [AccessDevelopers] Re: Access Restriction

 

Hi Jim,

How do you send a form to each of the databases?

How do you open each folder and find out if any user has the db open?

Giorgio

--- In AccessDevelopers@yahoogroups.com, Jim Wagner <luvmymelody@...>
wrote:
>
> Mark,
>
> In my database I have several buttons that will do the following
>
> Send a form to each of the databases
> send a report to each of the databases
> send a query to each of the databases
>
> I can control what the forms and reports look like in one master
database. I can control the entire process from the main database. It is
very helpful. I even have a button that opens each of the folders where
the databases reside so I can see if anyone is in them. I have several
buttons that email the users to inform them to exit the database for
maintenance and to get back in after maintenance has finished.
>
> Â
> Jim Wagner
> ________________________________
>
>
>
> ________________________________
> From: m_bacheldor m_bacheldor@...
> To: AccessDevelopers@yahoogroups.com
> Sent: Tuesday, October 4, 2011 12:22 PM
> Subject: [AccessDevelopers] Re: Access Restriction
>
>
> Â
> Thank Toby,
>
> It does help but I am looking at it in retrospect and if I had the
access and the knowledge I would be able to use and excel file to
backdoor into the queries. (At least I think that would be possible.)
Even with the database locked down I am not sure that I could exclude
this.
>
> I will keep searching just in case someone else has other ideas. The
only other thing that I might do is just what was suggested in an
earlier post. I might have to create several front end databases and
push the data into them.
>
> Since I have never did this I am sure it will be another fun learning
experience.
>
> I look forward to any more suggestions and help to get this thing
accomplished.
>
> Mark
> --- In AccessDevelopers@yahoogroups.com, "Toby Bierly" toby@ wrote:
> >
> > It is tricky to block access to data in a database yet allow them to
access the same data through an Excel link. In order for the Excel file
to be able to get the data, I imagine the person with the Excel file
would have to have access to the Access database file as well.
> >
> > So then it becomes, is there a way to lock down the database so that
the Excel user can't see the data. If you compile the database to an
MDE, that locks down forms, queries, reports, and modules, but the data
tables are still visible, so that probably won't work. You can go into
Tools --> Startup... and set it so Database Window, special access keys,
etc. are all disabled, but it doesn't stop users from using the Shift
bypass key. There is a way to disable the Shift bypass functionality as
well
(http://www.access-programmers.co.uk/forums/showthread.php?t=51479), but
be VERY careful or you make it so you can't access the database at all
either! Backup, backup, backup!
> >
> > One other concern is that if people can link to the data from Excel,
then they could link to any data in the database. What if you only want
them to be able to link to some tables and not others. In this case, you
may want to set up a seperate data file that the Excel User can access,
and then block access to the main database file via file permissions. In
the main database file, just link to the table that is stored in the
Excel-user-accessible file.
> >
> > Hope that helps,
> > Toby
> >
> > -----Original Message-----
> > From: AccessDevelopers@yahoogroups.com
[mailto:AccessDevelopers@yahoogroups.com] On Behalf Of m_bacheldor
> > Sent: Tuesday, October 04, 2011 8:48 AM
> > To: AccessDevelopers@yahoogroups.com
> > Subject: [AccessDevelopers] Access Restriction
> >
> >
> >
> > Good Afternoon,
> >
> > I have gotten my database working pretty good for now, but now I am
faced with a security issue. Is there a was to restrict access, who can
open the database, but still allow users to access data through
linked/restricted excel files?
> > I have set up excel files that have hard code linkes to the database
queries. I would like for the users to be able to refresh the data from
the excel files but I do not want them to be able to open/access the
database.
> > It seems like the requirements that I am given to complete this task
change daily.
> >
> > I appreciate you responses,
> >
> > Mark
> >
>



__._,_.___
Recent Activity:

Please zip all files prior to uploading to Files section.
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar