Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Positioning of cursor in field (2000)

    Hans,

    I managed to resolve the issue with positioning of cursor in a chosen field when l click on "Add Record".
    This was due to the gap in the field name which you mentioned.

    But l now have the problem of trying to position the cursor after the input mask.
    I don't know how to get round this problem.
    Do you have any ideas?
    See attachment for what l mean.

    Justin.
    Attached Images Attached Images

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

    Re: Positioning of cursor in field (2000)

    If you want to do this for all controls, select Tools | Options..., and activate the Keyboard tab. In the section labeled "Behavior entering field", select the option "Go to end of field". This is a user-level setting, so you will have to instruct all users to do the same. (This option can be set using code, but I'm not in favor of modifying user preferences in code.)

    If you want to do it for this specific control only:
    - Open the form in design view.
    - Select the text box.
    - Activate the Event tab of the Properties window.
    - Click in the On Enter event, then select [Event procedure] from the dropdown list.
    - Click the ... button to the right of the dropdown arrow.
    - Make the code look like this, but with the correct name of the control substituted:

    Private Sub ControlName_Enter()
    Me.[ControlName].SelLength = 0
    Me.[ControlName].SelStart = Len(Me.[ControlName].Text)
    End Sub

  3. #3
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Positioning of cursor in field (2000)

    That works fine.

    Many Thanks Hans.

    Justin.

Posting Permissions

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