?
Solved

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

Posted on 2007-11-20
5
Medium Priority
?
708 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 600 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 600 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 800 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 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