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

    Can't Set Focus on Subform Text Box (2003)

    When I try to open the VapPorLiv form in the attached mdb I get the following message:
    <font color=448800>Run-time error '2105':
    Cannot go to the specified record </font color=448800>
    and if I click the debug button the following line is highlighted:
    Me.vap1.Form.L_LAG.SetFocus
    I've applied the same concept to the PalPorLiv form and it opens without any problems. What brings about the error?

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

    Re: Can't Set Focus on Subform Text Box (2003)

    The VapPorLiv form opens to a date for which the subform has no records. Since the subform is not editable, there is no blank new record either, so the subform is blank. Hence it is impossible to set focus to L_LAG - this text box is not visible.

    The subform in PalPorLiv is editable, so it will display a new blank record, and it is possible to set focus to a control in the subform.

    Vap is not editable because Query 1 is not editable, and this is because there is no unique key on any of the link fields.

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

    Re: Can't Set Focus on Subform Text Box (2003)

    Thank you Hans,
    I had forgotten to give primary keys to the tables <img src=/S/blush.gif border=0 alt=blush width=15 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
  •