Results 1 to 3 of 3
  1. #1
    brs's Avatar
    brs is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    17

    Question toggling linked subform shows parameter entry window twice.

    hello guys,



    i have two subforms in a main form. book_sub and book order subform. there are various subforms which i toggle in book order subform window by changing their properties with command button on main form. here is the code -

    Code:
    private sub billq_click()
    Me.BOOK_SUB.SourceObject = "BILLQ"
    Me.BOOK_SUB.LinkMasterFields = "[BOOK ORDER SUBFORM].FORM![ORDER ID]"
    Me.BOOK_SUB.LinkChildFields = "[order ID]"
    
    
    private sub stock_click()
    Me.BOOK_SUB.SourceObject = "stock"
    Me.BOOK_SUB.LinkMasterFields = "[BOOK ORDER SUBFORM].FORM![BOOKCD]"
    Me.BOOK_SUB.LinkChildFields = "[BOOKCODE]"
    now the problem is when i change billq to stock it shows parameter entry window with caption [order id] twice. after clicking ok it does toggle the form to stock. then when i click button for billq again it shows the same thing.

    the code works fine except showing parameter entry window twice with every toggle. what can be the problem here?

  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
    Did you consider placing subforms on a Tab control? User can just as easily 'toggle' by clicking the tabs. Then no code is needed.
    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
    brs's Avatar
    brs is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    17
    Good suggestion, thanks

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

Similar Threads

  1. Replies: 2
    Last Post: 01-28-2014, 10:13 PM
  2. Replies: 3
    Last Post: 12-13-2012, 04:40 AM
  3. Replies: 1
    Last Post: 04-18-2012, 11:06 AM
  4. Replies: 3
    Last Post: 04-13-2012, 10:39 AM
  5. Resizing data entry window
    By unit25 in forum Access
    Replies: 6
    Last Post: 11-15-2010, 02:22 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