Results 1 to 12 of 12
  1. #1
    Mac R is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2022
    Location
    Maine, USA
    Posts
    39

    Calling the Expression Builder (code builder?) in VBA for Applications (MSAccess 2013)

    Howdy,

    Absolute newbie to this forum, but not to Access. Recently made the jump (no laughter or judgement, k?) from Access 97 to Access 2013. When writing code in '97 I could right click and get the option to "build" code, or expressions in the vba screen.





    I used this extensively, and it's a HUGE help not having to jump back and forth between object view and code view. For the LIFE of me, i can't find this in Access 2013 VBA. Can anyone help me? It CAN'T be gone, can it?

    Probably a silly question, I can't seem to find the answer (or the concern) anywhere else on the web... Any help would be appreciated.

    Thanks,
    Mac R

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Welcome to the site. Your image did not attach properly, you might want to try again.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Mac R is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2022
    Location
    Maine, USA
    Posts
    39
    Quote Originally Posted by pbaldy View Post
    Welcome to the site. Your image did not attach properly, you might want to try again.
    Apologies... I did a simple ctrl-c ctrl-v instead of using the above tools...

    Click image for larger version. 

Name:	Build.JPG 
Views:	30 
Size:	19.4 KB 
ID:	47878
    Thanks...

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Interesting, I started with 97 but I don't recall that. I switched to 2000 pretty early though. I've seen Build in object menus, but not in VBA itself. It would bring up the Expression Builder? I guess I'm not seeing the use for that in VBA but that's just my ignorance showing.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Alt & F11 will bring up the VBA window from anywhere, but will normally open on the last code window you had open.

    I don't think there is any way to directly get to the code properties of an event without clicking in it's properties window.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  6. #6
    Mac R is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2022
    Location
    Maine, USA
    Posts
    39
    Quote Originally Posted by pbaldy View Post
    Interesting, I started with 97 but I don't recall that. I switched to 2000 pretty early though. I've seen Build in object menus, but not in VBA itself. It would bring up the Expression Builder? I guess I'm not seeing the use for that in VBA but that's just my ignorance showing.
    I do a ton of record and data manipulation in VBA, and the expression builder allows for very quick and easy reference to table names and fields, form names and fields, etc. without have to remember them or revert back to the object design window to find the name of a specific control. So, for example, you're building a very specific SQL string to run in VBA and you want to update a field in a table, the expression builder allows you to "look up" the reference and either import to your code line, or of course copy and paste. HUGE time saver for me.

    Here's an example in '97, looking up a field on a form that is not directly linked to the code. In a VBA window, right click, select Build from the pop-up, then the Expression Builder appears in the VBA code window.

    Click image for larger version. 

Name:	Expression Builder.JPG 
Views:	26 
Size:	181.8 KB 
ID:	47881

    It sounds to me like no one is 1) using it, or 2) cares that it's gone. Wow. It cut my coding time by a third, easy.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I see your point, it looks useful. I found an old thread asking the same question and apparently it's gone. One point made was: "Access 97 did not have a separate code window. It was incorporated in the main body of Access so that "generate" might have been just the expression builder that you can call up from the properties page."
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    Mac R is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2022
    Location
    Maine, USA
    Posts
    39
    Quote Originally Posted by pbaldy View Post
    I see your point, it looks useful. I found an old thread asking the same question and apparently it's gone. One point made was: "Access 97 did not have a separate code window. It was incorporated in the main body of Access so that "generate" might have been just the expression builder that you can call up from the properties page."
    <sigh> ... I was afraid of that; no direct link from one to the other. Sad. But I guess I need to accept forward momentum sometime leaves good tools behind... That being said, the 'leap' from '97 to 2013 was at first very frightening, but I have come to learn that a huge number of options and tools I never had are at my fingertips... I wonder if the leap from 2013 to 365 will produce the same number of "Ahhhh!"s

    Thanks for hangin with me, PBaldy, I stopped into your web site, nice!

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and thanks for the compliment! I don't think you'll see as many differences in 365. The major visible change was with 2007, the change from menus to the ribbon. I can't think of anything major between 2013 and 365, other than maybe the linked table manager. Others may think of something I've missed, which would be no surprise.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    Mac R is offline Advanced Beginner
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2022
    Location
    Maine, USA
    Posts
    39
    I know this is closed, but I thought I'd add to it as things have progressed with my understanding of VBA under Access 2013. I posted another thread on this forum about the difference between using dot (.) and bang (!) [I called it exclamation mark, so learned what Bang is...] and learned a little about InteliSense (SP?).

    By using the DOT instead of BANG syntax, I kinda/sorta get what I was seeking in this thread, which is a way to select fields and controls off an object (form in this case) in code systemically, what used to be the Build option in VBA in Acc97. Yea!

    Cool.

  11. #11
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    just as thought - Can't remember if add-ins existed back in '97 but if they could, perhaps your 97 version had an add-in which provided the build facility.

    re dot v bang. dot early binds (which is why intellisense works) whilst bang late binds. Sometimes you can only late bind which is why when referring to fields in a vba generated recordset (which are late bound) you can use rs!myfield but not rs.myfield

    compile will detect errors with early bound objects whilst late bound object errors are not detected until runtime.

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Quote Originally Posted by Ajax View Post
    just as thought - Can't remember if add-ins existed back in '97 but if they could, perhaps your 97 version had an add-in which provided the build facility.
    Just re-checked. The Build context menu item was built in to A97 but had disappeared again from A2000 onwards
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 1
    Last Post: 05-15-2018, 09:46 AM
  2. Replies: 7
    Last Post: 03-01-2017, 05:45 AM
  3. macro, expression or code builder??
    By Jen0dorf in forum Access
    Replies: 5
    Last Post: 10-17-2015, 11:46 AM
  4. Macro Builder and Code Builder
    By data808 in forum Macros
    Replies: 2
    Last Post: 01-12-2014, 11:28 AM
  5. Replies: 1
    Last Post: 05-09-2013, 07: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