Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Focus Setting on a Template (2003)

    The following code line
    Me.FormFields("cmbUnit").Select
    in the Document_Open() event of the attached doc file makes sure that, on Open, the focus gets set to the cmbUnit combo box but why doesn't the same thing happen if you save the doc as a template(.dot)? In this case the focus on opening goes to the CommandButton1 button.
    Attached Files Attached Files

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

    Re: Focus Setting on a Template (2003)

    When you double-click a template, you create a new document based on the template. This causes the Document_New event to fire, not the Document_Open event. So you must put the same line in the Document_New event procedure in the ThisDocument module of the template.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Focus Setting on a Template (2003)

    What can I say? You transcend us all... <img src=/S/gent.gif border=0 alt=gent width=17 height=25> <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

Posting Permissions

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