Results 1 to 3 of 3
  1. #1
    joe55555 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    24

    what's the difference of using Forms! or [Forms]!

    hello guys,



    i'm sort of new in access vba (im using access 2013), i understand all the concepts and basics but some stuff in access are different from excel

    i noticed sometimes when calling a form they use:

    Forms!FormName!Control
    or
    Forms![FormName]![Control]
    or
    [Forms]![FormName]![Control]

    what is the real difference and when to use each one !?

    Thank you

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    In objects (queries or form/report controls), Access will add the [] when it can. But they are really normally only required when names have spaces or special characters/punctuation (underscore is exception) or names are reserved words. This is why it is a good idea to avoid those. There are a few situations where they are required regardless and you must remember to type them.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    joe55555 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    24
    Alright I see, well thank you June7

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

Similar Threads

  1. Replies: 5
    Last Post: 01-16-2013, 03:48 PM
  2. Multiple forms or embedded sub-forms
    By Juicejam in forum Forms
    Replies: 2
    Last Post: 08-23-2011, 07:31 AM
  3. Replies: 1
    Last Post: 01-04-2011, 05:04 AM
  4. Search forms and sub forms
    By FadingAPE in forum Forms
    Replies: 1
    Last Post: 12-15-2010, 01:59 PM
  5. Replies: 4
    Last Post: 04-01-2009, 08:49 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