Solved

How do I hide tables and forms from user and make a form open everytime application initializes

Posted on 2007-11-20
5
704 Views
Last Modified: 2013-11-29
I am using msaccess 2007 and I want to hide my tables and forms and queries from users. I also want a form to pop up when they initialize the application. I did it with ms access 2003 but with 2007 I just don't see the options.

Thanks
0
Comment
Question by:syedasimmeesaq
5 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 150 total points
ID: 20322048
in access 2007
click the logo in the upper left corner of the access window
select access options
0
 
LVL 9

Author Comment

by:syedasimmeesaq
ID: 20322493
But how do I use it to do above. I remember in msaccess 2003 there was something where you can use startup and choose a form to open everytime an application will initialize.
Thanks
0
 

Assisted Solution

by:tripsma
tripsma earned 150 total points
ID: 20322872
1) Click the logo in the upper left corner of the access window
2) Select access options
3) Select Current Database
4) In the Application Options area ( at the top) go to teh Display Form pick list and select the form you would liek to start up when the database is opened.
0
 
LVL 2

Accepted Solution

by:
Remi Gelinas earned 200 total points
ID: 20322966
Using code, you can do the following

Public Function Autoexec()
On Error Resume Next
    Dim iAttr As Long, aDef As Variant
    iAttr = dbSystemObject + dbHiddenObject

    '#############################
    '# Hide tables
    CurrentDb.TableDefs("MSysACEs").Attributes = iAttr            'Table Systeme
    CurrentDb.TableDefs("MSysQueries").Attributes = iAttr         'Table Systeme
    CurrentDb.TableDefs("MSysObjects").Attributes = iAttr         'Table Systeme
    CurrentDb.TableDefs("MSysAccessXML").Attributes = iAttr       'Table Systeme
    CurrentDb.TableDefs("MSysIMEXSpecs").Attributes = iAttr       'Table Systeme
    CurrentDb.TableDefs("MSysIMEXColumns").Attributes = iAttr     'Table Systeme
    CurrentDb.TableDefs("MSysAccessObjects").Attributes = iAttr   'Table Systeme
    CurrentDb.TableDefs("MSysRelationships").Attributes = iAttr   'Table Systeme

    '###########################################
    '# Hide modules
    For Each aDef In CurrentProject.AllModules
        Application.SetHiddenAttribute acModule, aDef.Name, True
    Next
   
    '###############################################
    '# Hide forms
    For Each aDef In CurrentProject.AllForms
        If aDef.Name <> "Menu" Then
            Application.SetHiddenAttribute acForm, aDef.Name, True
        End If
    Next
   
    '###############################################
    '# Open default form
    Call DoCmd.OpenForm("Menu", acNormal, , , acFormEdit, acWindowNormal)

End Function
0
 
LVL 9

Author Comment

by:syedasimmeesaq
ID: 20444257
I have not forgotten about this question. I am doing the other parts. I will be back on this in a week. Thanks
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question