Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
709 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

609 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