Results 1 to 4 of 4
  1. #1
    Tom123 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    11

    Opening a form in a form and showing datasheet view

    Hello,



    I would like to open Form B by clicking a button in Form A and I want Form B to come up in datasheet view. I've set the default view to datasheet in Form B's properties and when I open it from the objects list I am presented with datasheet view like I wanted but when I open it using a button in another form it comes up with the form view and I have to switch to datasheet view manually. Is there a property in the button or something that I need to change?


    Tom

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Form view is the default, regardless of the property setting, when opening form independently by code. Specify the datasheet option in the code.
    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
    breakingme10 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Oklahoma
    Posts
    153
    Use a macro on the OnClick property for the button.

    Open Form
    Specify the form name and then chose Datasheet

  4. #4
    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
    DoCmd.OpenForm "FormName", acFormDS
    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. Opening a Form in Datasheet Mode.
    By Robeen in forum Forms
    Replies: 7
    Last Post: 11-19-2013, 04:03 PM
  2. Replies: 3
    Last Post: 08-18-2013, 09:14 PM
  3. Replies: 6
    Last Post: 11-21-2012, 05:10 PM
  4. Replies: 16
    Last Post: 09-12-2012, 08:39 AM
  5. Totals showing across bottom of Datasheet view
    By Laurie B. in forum Access
    Replies: 8
    Last Post: 09-14-2011, 01:47 PM

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