Results 1 to 2 of 2
  1. #1
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168

    Default open View changes when opened from VBA

    Ok I have a couple of general maintenance forms that when opened from the object browser menu (the menu on the left side of access) The forms open in Datasheet View, not flashy but its how I want them to open

    But I am creating a menu with buttons to open these forms. and when I use the on click DoCmd.OpenForm "frm_TransType" the form opens in form view.

    even after changing all the properties of the form

    Default View - Datasheet


    Allow Form View - No
    Allow Datasheet View - Yes
    Allow Layout View - No

    it still always opens in form view when using the vba coded button

    thanks

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    That's the Default View when using the syntax

    DoCmd.OpenForm

    To get it to open in Datatsheet View, use with this parameter

    DoCmd.OpenForm "frm_TransType", acFormDS

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 10
    Last Post: 06-09-2017, 02:33 PM
  2. Replies: 4
    Last Post: 01-17-2016, 10:25 PM
  3. Replies: 2
    Last Post: 07-29-2015, 01:17 PM
  4. Replies: 6
    Last Post: 05-09-2014, 09:03 AM
  5. Replies: 13
    Last Post: 10-12-2011, 12: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