Results 1 to 10 of 10
  1. #1
    tatihulot is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    60

    Add New Record Button: Place Mouse Cursor in Specific Field by Clicking It?


    Hello, everyone.
    I assume this is simple, but I haven’t figured out how to do it yet.
    I’ve created an Add New Record button on my form. I’d like the mouse cursor to move directly to a specific field when I click that Add New Record button. How do I configure the button to do that? Thank you!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In what View are you running your form (Datasheet, Continuous, Single)? What do you have in the Add New Record button?

  3. #3
    tatihulot is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    60
    I really don't know what view I'm in. How do I determine that?

    As for the button: I created the button with the Command Button Wizard. In the Categories section, I selected Record Operations, and in the Actions section, I selected Add New Record.
    The text I'm using says New Record. The meaningful name of the button is simply Add New Record. I'm not sure what else to tell you about this button. I have tweaked its appearance; I've changed the font to Arial 16 and am using a darker black font color, but that's all I can tell you.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What does it say on the Format tab of the property sheet under Default View? If you click on the button in design view of the form and look at the Event tab of the property sheet, what do you see under the Click Event?

  5. #5
    tatihulot is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    60
    In Properties/Format, the Default View says Single Form.

    When I click the button in Design View, in Properties/Event, in On Click, it says Embedded Macro.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by tatihulot View Post
    In Properties/Format, the Default View says Single Form.

    When I click the button in Design View, in Properties/Event, in On Click, it says Embedded Macro.
    See how much you've learned already? What is the name of the control on your form to which you wish to move the focus?

  7. #7
    tatihulot is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    60
    I'm actually quite computer-savvy, but for some reason, databases--even flat-file ones--have been my Achilles' Heel. Except for Lotus Approach. That program was easy. It doesn't exist anymore, though. Access is tough.

    Okay, back to your question. The name of the control on my form that I want to set focus to is "Title." That's it. Thank you.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm not familiar with Macros but in code you would end with: Me.Title.SetFocus
    Maybe there is a GoToControl command in the macros.

  9. #9
    tatihulot is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    60
    I have little experience with macros, but it looks like I'm going to be able to help you this time.

    You are absolutely correct. There is a Go To Control command.

    I clicked the button, and in Event/On Click, I click the three dots to open up the macro screen. On the right hand side, in the Action Catalog, in Actions/Database Objects, there is an option for GoToControl. I selected that, and a box opens up in the macro screen. I simply typed in the name of the control, closed the macro screen, and voila. It works.

    Thanks again for your help.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! We both learned something. I marked this thread as Solved for you. It is under Thread Tools at the top of the thread.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How do i make a button that will go to a specific record?
    By TOMMY.MYERS668 in forum Programming
    Replies: 2
    Last Post: 02-08-2013, 07:54 AM
  2. Replies: 2
    Last Post: 10-08-2012, 12:39 PM
  3. Replies: 10
    Last Post: 03-29-2012, 10:44 AM
  4. Replies: 4
    Last Post: 10-05-2011, 01:28 PM
  5. Replies: 3
    Last Post: 05-28-2011, 09:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums