Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    6

    Unanswered: Position cursor in unbound textbox in Header section on Continious Form

    Hi to you all

    I have a continuious form for inputing Athletics results, when I open the form I want the cursor to be positioned in an unbound textbox called "event" which is in the header of the form. This is so I can enter the event code and use DLookup to get AgeGroup, M/F and Event.
    When I open the form it goes streight to entering the records. The table is always empty when I open the form as I am using it to sort records into the correct order and joining to another table for points awarded. I am using Access 2010.



    Jim.
    Last edited by jimbob1160; 03-14-13 at 19:16. Reason: More info in title

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    While not a Reserved Word, 'Event' has special meaning in Access VBA, and using it as the name of a Control confuses the Access Gnomes, so change the name to something else, say txtEvent and then use this:

    Code:
    Private Sub Form_Load()
      txtEvent.SetFocus
    End Sub


    Linq ;0)>
    Last edited by Missinglinq; 03-14-13 at 20:24.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Aug 2009
    Posts
    6
    Thanks Missinglinq for the reply, the form now opens with the cursor in the txtEvent box.

    Jim.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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