Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2002
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting Focus on SubForm (Access 97)

    I have a Subform that shows records from a temp table, every record has a checkbox , an ID and a combo box for outcome. All the records with checked checkbox go to a tracking table on click of OK button on the main form.
    What I want to do is if a record has been selected then user must select an outcome as well. I am getting this done by setting a recordset on temp table and I am showing the message to user to select an outcome ....I want to setfocus on the particular record on subform which has missing outcome.
    I did try to use setfocus method but control remains on the record where it was before I hit OK.
    How can I do it?

    Thanks in advance

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

    Re: Setting Focus on SubForm (Access 97)

    SetFocus applies to controls, not records. You would have to navigate through the recordset in the subform to find a record without an outcome and set the subform's bookmark to that record. Why not just use the BeforeUpdate event of the subform to test for a True value in the checkbox and force them to select an outcome before you save the record in the first place?
    Charlotte

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

    Re: Setting Focus on SubForm (Access 97)

    You asked a related question in this thread as well, so I am going to lock this thread and request any further responses be posted to the other thread. Asking the same question twice won't get any better answers, so please post any further explanations to the other thread.
    Charlotte

Posting Permissions

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