Results 1 to 6 of 6
  1. #1
    Remster is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2010
    Posts
    317

    Event in subform when move record in main form


    What event fires in a subform when you move record in the main form? It can't be On Current, since there may be no records in the subform for that record in the main form.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    there may be none, since the master form doesnt affect the subform.
    but On Current should fire, but yes, if no records, then no current.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The current event of the main form will fire; I don't think anything will fire in the subform.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Remster is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2010
    Posts
    317
    Ah, then I may need a different approach. I want AllowAdditions to be True or False for the subform depending on the value in one of the fields of the main form. The problem is that the new record row in the subform appears or disappears (it's a continuous form) before the subform has requeried - if that's the right way to put it - which looks odd. Is there any way of preventing this?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I'd set that property in the current event of the main form, and probably the after update event of the control containing that value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Remster is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2010
    Posts
    317
    "I'd set that property in the current event of the main form".

    Unfortunately, that's what I'm doing already. The problem is that the new record row is appearing at (or disappearing from) the bottom of the records on the subform before the records relating to the record on the main form that I've moved to are displayed.

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

Similar Threads

  1. Replies: 4
    Last Post: 04-30-2018, 06:11 AM
  2. Replies: 2
    Last Post: 12-07-2014, 01:15 PM
  3. Move Focus From Subform To Main Form
    By burrina in forum Forms
    Replies: 2
    Last Post: 11-18-2012, 03:09 AM
  4. Replies: 2
    Last Post: 06-09-2012, 01:56 AM
  5. Call a subform event from the main form
    By bonecone in forum Programming
    Replies: 2
    Last Post: 05-02-2012, 11:36 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