Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I won't even bother to apologize, so here goes:

    MainForm: frmMembers

    1stSubForm Ctl Name: subFormEntry ( it's a single form )

    2ndSubForm Ctl Name: subFormListing ( it's a continuous form reflecting multiple records created in subFormEntry )

    A new record is created in subFormEntry

    Does not get displayed in subFormListing unless I advance one record and return.

    I wish to have the subFormEntry "immediately" display the record added in subFormEntry

    Thanks in advance for any help with this, . . . . . Again!
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    We need detailed information. Could you attach a stripped down and zipped copy of the database?
    • Make a copy of the database (in Access 2000 or 2002-2003 format) and work with that.
    • Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    • In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    • Remove or modify data of a confidential nature.
    • Perform a compact and repair (Tools/Database Utilities).
    • Make a zip file containing the database.
    • If you have difficulties getting the zip file reasonably small, save the database in Access 97 format and then zip it.
    • Attach the zip file to a reply.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='795415' date='29-Sep-2009 01:34']We need detailed information. Could you attach a stripped down and zipped copy of the database?
    • Make a copy of the database (in Access 2000 or 2002-2003 format) and work with that.
    • Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    • In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    • Remove or modify data of a confidential nature.
    • Perform a compact and repair (Tools/Database Utilities).
    • Make a zip file containing the database.
    • If you have difficulties getting the zip file reasonably small, save the database in Access 97 format and then zip it.
    • Attach the zip file to a reply.
    [/quote]
    Good Sunshiny Morning Hans,

    I've attached the culprit database and would appreciate your having a look at it and showing me the error of my ways
    Attached Files Attached Files
    Cheers,
    Andy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    When the user selects a class from the combo box cboClass, the record (in the first subform) hasn't been saved yet, so the other subform cannot display the change. To enable the other subform to see the change, you must save the record. You can then requery the other subform. You can do this in the After Update event of cboClass:

    Code:
    Private Sub cboClass_AfterUpdate()
      ' Save the record NOW
      RunCommand acCmdSaveRecord
      ' Update the other subform
      Me.Parent!subformListing.Requery
    End Sub

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='795490' date='29-Sep-2009 10:26']When the user selects a class from the combo box cboClass, the record (in the first subform) hasn't been saved yet, so the other subform cannot display the change. To enable the other subform to see the change, you must save the record. You can then requery the other subform. You can do this in the After Update event of cboClass:

    Code:
    Private Sub cboClass_AfterUpdate()
      ' Save the record NOW
      RunCommand acCmdSaveRecord
      ' Update the other subform
      Me.Parent!subformListing.Requery
    End Sub
    [/quote]

    Hans,

    Awesome! Two little lines of code. The irksome part for myself is that I know that somewhere deep down in my past coding I had done something similar, obviously with your help I'm sure, but I just couldn't find it. I even used the really great search-your-own postings feature in the Forum, but still couldn't find it.

    Thanks again
    Cheers,
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •