Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Keep subform records visible

    Access 97. In a subform with 10 records, a button triggers a calculation on the current record. When this happens, the records "scroll" upward until the current record is at the top of the subform window, effectively hiding all previous records. I need to keep all the subform records visible.

    I can use the navigation buttons to move back to the first record, but if I try in code, I'm told that the form is not open. What little piece of information do I need?

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Keep subform records visible

    Post the code you're trying to use. Someone should be able to spot the problem.
    Charlotte

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Keep subform records visible

    I bet you are trying to address the subform directly in the Forms collection, as in "Forms!formname", etc.

    A subform is NOT an open form! That is, it is not in Forms collection. YOu must access it via the subform control on the mainform. So it would be like this:
    Forms!MainformName!subformControlName.Form.....etc .
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Keep subform records visible

    Yes, you are right! But I still don't understand. The subform is not an open form. As a user, I can click the navigation button in the subform that will take me to the first record. In an open form, I can ask to go to the first record via code. How do I use code to go to the first record in a subform CONTROL?

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Keep subform records visible

    I generally do it this way:
    With Forms!MainFormName!subformControlName.Form
    .recordsetclone.movefirst
    .bookmark = .recordsetclone.bookmark
    end with
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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