Solved

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

Posted on 2007-11-20
5
701 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 119

Assisted Solution

by:Rey Obrero
Rey Obrero 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:
Orgrim 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now