Results 1 to 12 of 12
  1. #1
    jfriedm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    8

    Closing Datasheet Forms Within Each Other

    Hello,



    I've got a Datasheet form which has a Datasheet Subform within it. By default, none of the subforms display, and the user clicks the "plus" on the leftmost column. What I'd like to do is prevent a user from having multiple subforms open at once. Basically, when the user clicks to open another subform, the first one closes.

    How can this be done?

    Also, is there a way to do conditional formatting (either using the wizard or with vba) on datasheet forms?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Never tried Datasheet form/subform arrangement.

    I have used Conditional Formatting on Datasheet view.

    Want to provide db for analysis? Follow instructions at bottom of my post.
    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
    jfriedm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    8
    Hi June7,

    Unfortunately, I can't post the DB here -- it connects to a local sql server that isn't accessible outside of our network, so it wouldn't work.

    Jason

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Could make copy of frontend, import tables relevant to the issue.
    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.

  5. #5
    jfriedm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    8
    Hi June7,

    Attached is a dummy database that does basically the same thing as mine.

    I've solved the conditional formatting issue (bad formula).... but not the ability to close one subform when another is opened (or alternatively, close the previous subform when another primary record is selected).

    test.accdb

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    You have to click the - (minus) symbol to close the subform.

    I have never built a db that offers this setup as user interface.

    Review http://www.fmsinc.com/MicrosoftAcces...edSubforms.asp
    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.

  7. #7
    jfriedm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    8
    Yeah that's what I'm trying to avoid... because in my actual DB there is vb activity each time the form loads (based on parent content), I need a way to ensure that only 1 subform is open at once.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Odd, not getting the +/- to go away in form even though did in table.
    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.

  9. #9
    jfriedm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    8
    I'm fine with leaving the +/- in the form... just need it to automatically close when another record is selected.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Don't think there is any way to manage that behavior programatically. Think that functionality is intended for use in viewing tables/queries. For using forms, consider the option I referenced. It does work and I did figure out why the +/- didn't go away.
    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.

  11. #11
    jfriedm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    8
    Quote Originally Posted by June7 View Post
    Don't think there is any way to manage that behavior programatically. Think that functionality is intended for use in viewing tables/queries. For using forms, consider the option I referenced. It does work and I did figure out why the +/- didn't go away.
    What's the option you referenced?

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    The link in post 6 describes a method to relate two forms set in datasheet view.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-07-2012, 12:50 PM
  2. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  3. Issue w/ VBA code for Opening/Closing Forms
    By need_help12 in forum Forms
    Replies: 5
    Last Post: 04-20-2012, 11:09 AM
  4. Replies: 6
    Last Post: 11-09-2011, 02:41 AM
  5. Don't want to save forms on Refresh or closing
    By accesscoder in forum Forms
    Replies: 5
    Last Post: 09-25-2010, 12:03 AM

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