Results 1 to 3 of 3
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    Where would you programmatically change a form's property?


    For example consider the AutoCenter property. To set this property, I can pull up the actual form, enter design view, click the upper left corner to select the form, and view the Property Sheet.

    Under the Format tab, I can locate the AutoCenter property and change no to yes or vice versa.

    But suppose that I wanted to change the property to 'yes' not by using the GUI, but by writing code such as:

    Code:
    Me.AutoCenter = yes
    Where would I actually type in this code to affect the actual form itself?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Try the form Open event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265
    Thank you. I also just realized that the VB Editor for Access just like Excel has the ability to insert modules. So I realize that you can specify object properties there too.

    I didn't even think about the form's open event. Thank you for mentioning that.

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

Similar Threads

  1. How to change report to page 2 programmatically?
    By naeemahmad in forum Reports
    Replies: 23
    Last Post: 12-04-2013, 12:27 AM
  2. Replies: 5
    Last Post: 01-14-2013, 03:04 PM
  3. Navigation form property change
    By bdenton in forum Forms
    Replies: 2
    Last Post: 08-11-2011, 05:23 PM
  4. Change form property with VBA
    By jmk909er in forum Forms
    Replies: 1
    Last Post: 10-20-2010, 08:57 AM
  5. Replies: 1
    Last Post: 08-10-2008, 01:09 AM

Tags for this Thread

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