Results 1 to 4 of 4
  1. #1
    Carroll is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    2

    Permanently changing properties on a form in Access


    I want to permanently change some properties of controls on a form using VBA. The code I have written changes the properties successfully. But when the form is reloaded it reverts back to the original properties. How can I make the new properties permanent? The answer is probably simple, but I can't see it. Thanks in advance for the help.

  2. #2
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    In your VBA code you have to write it so that it opens the form in Design View, apply your property changes, then save the form and reopen it in Normal view.

    All of that has to be performed from a module outside of the code behind the form you want to modify.

  3. #3
    Carroll is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    2
    Thanks. I never would have found that on my own.

  4. #4
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    No problem.

    Please be sure to mark the thread as solved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. VBA changing a few control properties
    By snipe in forum Forms
    Replies: 23
    Last Post: 12-31-2013, 03:17 PM
  2. Replies: 1
    Last Post: 04-12-2013, 07:56 AM
  3. Checkbox to Permanently Close Form
    By Heatshiver in forum Forms
    Replies: 2
    Last Post: 12-29-2011, 10:17 AM
  4. Replies: 2
    Last Post: 04-28-2011, 07:30 PM
  5. Replies: 4
    Last Post: 01-02-2011, 08:09 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