Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Unanswered: Yet another SetFocus problem

    I have a form (A) on which is a command button which opens another form (B). This form contains a listbox - when the user selects an item from the list, focus should return to form A.

    I find if I enter Forms![myForm].SetFocus, everything works fine except that focus is actually returned to a control on the form which is not what I want because I want to requery.

    If I enter Forms![myForm]![myFirstControl].SetFocus, nothing happens. (I've also tried Forms![myForm].[myFirstControl].SetFocus)

    Is it obvious?

    Marion

  2. #2
    Join Date
    Aug 2002
    Location
    Northampton, England
    Posts
    266
    Use DoCmd.OpenForm "YourForm" SetFocus is for controls only

  3. #3
    Join Date
    Nov 2004
    Posts
    35

    Form setFocus

    I've got a problem then, because my plan was to rst.FindFirst txtSearch in the Forms GotFocus or Activate event. I can't refer to a form's recordset from a control, or can I?

    Marion

Posting Permissions

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