Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Requerying after a sub-form (2000)

    I use Access as a working tool to organise information, I am a good information analyst so this bit is usually good. I gave up coding many years ago so the databases always run using macros and queries; this works fine in most cases.

    I have a Form, based on a Table (named Process) and a sub form representing a one to many relationship, this happens to be a hierarchy and so the sub form is also based on the Process table and shows the children of the Process on the main Form. Each Process record has an Id field (autonumber) and a Parent id (long integer) the sub form is linked using these fields. This works beautifully. There are navigation buttons which "walk" up and down the hierarchy, from the Form you can navigate to the parent Process or the top of the hierarchy, from the subform you can navigate to the child Process (see the screen dump which should make this clear).

    What doesn't work (but used to years ago) is if I create process records in the subform I cannot navigate to them. Even if I requery I can't get to them, They do exist on the Process table but I can't do a find on the Form to get them. The only way to get to them is to exit the form and reload. I'm sure I used to requery and all was well, it feels a little like a buffering problem. I have now found one other way to get to the record in the same session i.e. without closing and reopening the Form - on the Form I sort the records (I use the Id field) on using the record selectors to go to the end I can see the last record created (on the sub form), on the main Form I then go back to the Parent of the newly created records and lo and behold I can use the navigation buttons on the sub form to get to the Child Process record!

    I don't want to have to leap into code, so ideas or suggestions would be helpful

    Many thanks.................. liz
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Requerying after a sub-form (2000)

    Apart from closing / reopening the form and sorting, another way to force the main form to read all records without using code is the menu option Records | Remove Filter/Sort. Otherwise, I don't see how to do this without using code (for instance, a command button on the main form, or an After Insert event handler for the subform.)

  3. #3
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Requerying after a sub-form (2000)

    Hans,

    Thank you for this, I had tried all sorts of other things but no luck, this seems to work well

    liz

Posting Permissions

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