Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14

    Convert mdb file to accdb with the same protection

    I had an Access database on the 2003 version of Mdb and I hide the forms, reports and ...... with this code


    Application.SetHiddenAttribute acForm, "Form_name", True


    now i have converted the file to the 2010 format accdb format,but an error occurs in this code
    Application.SetHiddenAttribute acForm, "Form_name", True


    Please explain and explain why.

  2. #2
    John_G is offline VIP
    Windows 10 Access 2016
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    What is the error message you are getting?

  3. #3
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14
    Quote Originally Posted by ameedoo3000 View Post
    I had an Access database on the 2003 version of Mdb and I hide the forms, reports and ...... with this code
    Application.SetHiddenAttribute acForm, "Form_name", True


    now i have converted the file to the 2010 format accdb format,but an error occurs in this code
    Application.SetHiddenAttribute acForm, "Form_name", True


    Please explain and explain why.
    I want to prevent anyone from importing of objects the Access project such as forms, reports, tables, modules, etc.
    So I hide those objects using the above code, and this was in the 2003 version and when I this upgraded to the 2007 version, this code did not work and an error message appears

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    Based on the info provided you have a form called ‘form_name’. Seems very unlikely to me and I suspect is the reason for the error, whatever it may be. Cannot make any further suggestions until you answer post#2

  5. #5
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Agree with previous answer
    That code still works in newer versions of Access and is doing exactly the same thing as right clicking on the object in the nav pane and selecting Hide

    FYI that's really not at all secure as hidden objects can easily be shown by clicking Show Hidden Objects in Navigation Objects
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  6. #6
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14
    Click image for larger version. 

Name:	Untitled11.png 
Views:	16 
Size:	4.0 KB 
ID:	37438
    What is the effective way to hide project subjects ?

  7. #7
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I've no idea why you are getting that error ...nor is it clear what 'project subjects are'

    However if you mean how do I hide database objects in the navigation pane, the easiest way is to:
    a) hide the navigation pane - see this example database Manage the Application Interface
    b) hide Access Options in the File menu (so users can't reverse that)

    If you just want to prevent changes to the design of forms & reports or importing of those objects from another database, change to ACCDE before distributing.
    For more info on security, see this article on my website: Improve security
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  8. #8
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14
    please ... how can i hide the navigation pane and how can i hide Access option ?
    please more
    explain ...

  9. #9
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    As I have already stated, try my example application and study the code supplied.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  10. #10
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14
    Sorry link does not work

  11. #11
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Sorry about that. Both links work now
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  12. #12
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14
    please attach this example ..

  13. #13
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Both links are now working. Download the example from the first of the linked webpages
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  14. #14
    ameedoo3000 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2019
    Posts
    14
    i allready download the example but any one can unhide my objects . so my problem is stell stand
    i want to hide all objects in my project that any one can not import it any way
    Is this in the possibility of Access databases?

  15. #15
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    See posts 10 & 12 in this parallel thread
    https://www.accessforums.net/showthread.php?t=75612
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Can an accdb file be moved from one computer to another?
    By fred615@gmail.com in forum Access
    Replies: 8
    Last Post: 08-07-2018, 02:22 PM
  2. Replies: 4
    Last Post: 02-28-2018, 01:12 PM
  3. Replies: 2
    Last Post: 05-01-2014, 01:31 PM
  4. Replies: 10
    Last Post: 11-01-2013, 01:20 PM
  5. How to convert from .accdb to executablle files
    By cheesewizz in forum Access
    Replies: 1
    Last Post: 08-29-2012, 06:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums