Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    dgtampa is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    28
    Thank you both! I wound up figuring it out by just trying out SetFocus; I was about to post my little victory when I saw that you had already replied!

    Take care, ...and salud...

  2. #17
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    A couple of explanations:

    As you've found out, Paul's

    Me.cboTaskChoose.SetFocus

    works.

    So would

    cboTaskChoose.SetFocus

    as well as

    DoCmd.GoToControl "cboTaskChoose"

    DoCmd.GoToControl takes a String as an Argument, and Me.cboTaskChoose returns a String, but the problem with

    DoCmd.GoToControl Me.cboTaskChoose

    was that the String that Me.cboTaskChoose returns, and is providing

    DoCmd.GoToControl Me.cboTaskChoose

    as an Argument, is the Value of cboTaskChoose, not the name of the Control! And there was no Control that matched the Value of cboTaskChoose.

    Also, several comments pointed out the IsEmpty() is inappropriate here, but didn't explain why. It's inappropriate because IsEmpty() is used against a Variable, not against a Control/Field. It's used to test whether or not a Value has been assigned to a Variable.

    Linq ;0)>

  3. #18
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Quote Originally Posted by Missinglinq View Post
    Also, several comments pointed out the IsEmpty() is inappropriate here, but didn't explain why.
    You must have missed the link in post 4.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #19
    dgtampa is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    28
    Thank you both for your replies!

    I had figured it out all on my own by trying out SetFocus and it worked! I was just signing in here to share my little victory when I saw that you both had already posted the answer. Thanks again!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Information message on current event
    By justauser in forum Forms
    Replies: 5
    Last Post: 02-07-2012, 12:15 PM
  2. Replies: 9
    Last Post: 12-09-2011, 12:20 PM
  3. Replies: 1
    Last Post: 02-25-2011, 11:32 AM
  4. User focus control in AfterUpdate event
    By nosliwmada@gmailcom in forum Programming
    Replies: 3
    Last Post: 12-20-2010, 12:51 PM
  5. Replies: 6
    Last Post: 11-16-2010, 02:38 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