Results 1 to 3 of 3
  1. #1
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149

    Invalid qualifier on simple SetFocus

    i have a form with Record Source is a Account Table with a field AccName.
    i use a textbox (named AccName) with Control Source set to AccName field.
    when i set focus to this textbox, i get compile error : invalid qualifier
    Code:
    Me.AccName.SetFocus


  2. #2
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I always rename controls so Access doesn't get confused - I would name the text box "tbAccName" (tb = textbox)
    Do a "Compact and Repair".

    You could delete the text box, do a "Compact and Repair", then re-create the text box bound to "AccName" (rename the control as above).

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    should adopt a naming convention and while at it, avoid reserved words, spaces and special characters (except possibly underscore, which I don't use)
    I find this one a bit too expansive (e.g. I only use qry for query preface and let the icons in the nav pane tell me which type it is if I forget)
    - http://access.mvps.org/access/general/gen0012.htm

    https://www.access-programmers.co.uk...d.php?t=225837

    What not to use in names
    - http://allenbrowne.com/AppIssueBadWord.html
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 12-05-2021, 06:17 AM
  2. Invalid Use of Null (probably a simple fix)
    By dannyok90 in forum Modules
    Replies: 6
    Last Post: 11-04-2021, 03:33 PM
  3. Invalid Qualifier VBA
    By mlrucci in forum Programming
    Replies: 4
    Last Post: 05-08-2021, 09:19 PM
  4. Replies: 5
    Last Post: 07-22-2014, 06:58 AM
  5. simple SetFocus
    By markjkubicki in forum Forms
    Replies: 5
    Last Post: 10-04-2011, 11:47 AM

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