Is AI Your Buddy, Your Assistant, or a Necessary Evil. With the Access Pacific Chapter (1 Viewer)

GPGeorge

George Hepworth
Local time
Yesterday, 21:04
Joined
Nov 25, 2004
Messages
3,412

Thursday, March 5th, 2025 6:30PM (Pacific, UTC - 8)

I am not doing much Access work these days. Instead, I'm using Claude in the Cloud and Claude Code to work on other projects that interest me. It occurred to me a couple of days ago that because I have both versions of Claude readily accessible, I've started to treat Claude in the Cloud as a sort of sounding board for ideas. I turn to Claude Code to do the actual work.

I'd love to hear how your development has changed, is changing, or might change in response to the tools available to us: CoPilot, Claude, ChatGPT, Gemini et al.

No right answers. No wrong answers.

When it’s time, join the meeting from here:

Join Zoom Meeting

If you are asked:

Meeting ID: 852 1966 9601
Passcode: 123456

Dial by your location
+1 253 215 8782 US (Tacoma)
+1 346 248 7799 US (Houston)
+1 669 900 9128 US (San Jose)
+1 301 715 8592 US (Washington DC)
+1 312 626 6799 US (Chicago)
+1 646 558 8656 US (New York)
Meeting ID: 861 2395 1916
Passcode: 123456
 
This topic comes up a lot in conversations with my students these days. Personally, I find AI to be a fantastic sounding board for brainstorming or untangling concepts, but I still rely on my own experience for most of the design and teaching. Tools like ChatGPT and Copilot work best when you know enough to double check their output. I've even caught a few little mistakes when using them on my own projects. Having an AI "buddy" can streamline a lot of repetitive or research-heavy tasks, but it's not really a replacement for the creativity and problem solving instincts you gain from real world Access work.

When I'm putting together my videos, I usually know ahead of time what I want to show. Sometimes, though, I'll give GPT my outline and ask, "Am I missing anything? Is there anything else you'd add to this?" It's great for brainstorming and for surfacing ideas I might not have thought of. It can also remind me of things I forgot about because, let's face it, I'm getting old. I might have seen something happen back in 1998, but it hasn't come up since. LOL.

I actually don't use GPT much for Access development or coding in general, unless it's something quick and simple. For example, if I need a small helper function like a bubble sort, something I know how to write but just don't feel like spending 20 or 30 minutes on, then sure, I'll let it handle that. Honestly, I'd say about 90 percent of what I use GPT for is writing. I tend to spew out my thoughts in a stream of consciousness, like this post for example, and then I'll hand it to GPT and say, "Can you turn this into a coherent couple of paragraphs?" I use it far more for that than for coding.
 
> Tools like ChatGPT and Copilot work best when you know enough to double check their output.

Case in point: over the last 2 days I spent about 6 hours with CoPilot fixing and optimizing a set of SQL Server views. They fell in 2 groups, and they disagreed over the Sum of Revenue, and not just by a few cents.
One of the things I did was put the Before data in Excel (say 15 columns * 300 rows), then next to it the improved version, and next to that a block of expressions that compared each cell in the first block to the corresponding cell in the second block. This made it very easy to find discrepancies, e.g.: "hey CoPilot, BidAmount is Null a lot more in your query than in the original one". Oh, oops, I see, I did that join incorrectly thinking .... Here is a new version...

Could I have done this all myself? Probably, but I think the new queries are superior, and the task was completed in way less time.
 
Thanks. I am mostly interested in figuring out where and when using an AI assistant or an AI buddy can speed things up.

Case in point was a recent decision to replace an IE web browser control in an Access form with an Edge web browser control. I had no idea how to create the javascript to automate the Edge browser, but I did know precisely what the expected results should be.

  • Log in to a website using my credentials.
  • Find a data point (in this case, one value is all I needed)
  • Download it
  • Insert it into the Access linked table.

It took Claude Code at least three iterations (and I want to say five) to work out how to do what I required. Each iteration was 5 to 10 minutes. In the end, we found a way to log in to the website from which I wanted to download statistics, locate the data and download and insert it into a linked table in the accdb. Starting from scratch, it would have taken many times longer just to learn enough about the javascript to get started, let alone run through those attempts. At every test, it was a simple binary decision, did I get the right data or did I not get it. I'm sure a more complicated task like the one Tom describes would be more challenging, but I am confident the outcome would be similar.

Speaking in terms of motivation, I think what it taught me is that we don't need to be intimidated or daunted by challenges. Productivity is a matter of effort expanded and results achieved. It's not that I don't think I could eventually have learned enough by massive trial and error to accomplish my goal. It's that off-loading the grunt work to Claude Code got me to the finish line in a few hours versus who know how many days.

If you want, I can share part of that project (with the exception of the website credentials 😀). You can be the judge of the quality of the code.
 
I use Copilot to assist adding a function to logout of a website when the form containing the edge browser control closed. None of it's solutions worked but it did point me to a working solution. I started by copying the section of the page with Sign Out into Copilot and asking how to click the sign out button. The code follows.

Code:
'-----------------
' Attempt to logout from ThinClient
Private Sub ClickLogOut()
    On Error GoTo errClickLogOut
    Dim logoutJS As String

    logoutJS _
        = "(function(){" & _
          "try{ " & _
            "var flyout=document.querySelector(" & _
                "'._-src-components-Header-Profile-ProfileDisplay-ProfileDisplay-module_flyout');" & _
            "if(!flyout){" & _
                "console.warn('Flyout not found. Is the profile menu open?');" & _
                "return;}"
    logoutJS = logoutJS & _
            "var container=flyout.closest('.css-18go0ue');" & _
            "if(container&&getComputedStyle(container).display==='none'){" & _
                "container.style.display='block';" & _
                "container.style.opacity='1';" & _
                "container.style.transform='none';}"
    logoutJS = logoutJS & _
            "var candidates=[...flyout.querySelectorAll('button.control,[role=""button""].control')];" & _
            "var textOf=e=>(e.textContent||'').trim();" & _
            "var attr=(e,n)=>(e.getAttribute(n)||'').trim();" & _
            "var btn=candidates.find(b=>textOf(b)==='Sign Out')" & _
                  "||candidates.find(b=>attr(b,'aria-label')==='Sign Out')" & _
                  "||candidates.find(b=>attr(b,'title')==='Sign Out');"
    logoutJS = logoutJS & _
            "if(!btn){" & _
                "console.warn('Could not find a ""Sign Out"" button by text/aria/title within the flyout.');" & _
                "return;}" & _
            "if(btn.hasAttribute('disabled')" & _
                "||attr(btn,'aria-disabled')==='true'){" & _
                "console.warn('""Sign Out"" button is disabled.');" & _
                "return;}"
    logoutJS = logoutJS & _
            "var evt=new MouseEvent('click',{bubbles:true,cancelable:true,view:window});" & _
            "btn.dispatchEvent(evt);" & _
            "}" & _
            "catch(e){" & _
            "console.error('Error clicking Sign Out:',e)" & _
            ";}})();"
'    Debug.Print logoutJS
    Me.WebBrowser1.ExecuteJavascript (logoutJS)
doneClickLogOut:
    Exit Sub
errClickLogOut:
    LogError "ClickLogOut"
    Resume doneClickLogOut
End Sub
 
I use Copilot to assist adding a function to logout of a website when the form containing the edge browser control closed. None of it's solutions worked but it did point me to a working solution. I started by copying the section of the page with Sign Out into Copilot and asking how to click the sign out button. The code follows.

Code:
'-----------------
' Attempt to logout from ThinClient
Private Sub ClickLogOut()
    On Error GoTo errClickLogOut
    Dim logoutJS As String

    logoutJS _
        = "(function(){" & _
          "try{ " & _
            "var flyout=document.querySelector(" & _
                "'._-src-components-Header-Profile-ProfileDisplay-ProfileDisplay-module_flyout');" & _
            "if(!flyout){" & _
                "console.warn('Flyout not found. Is the profile menu open?');" & _
                "return;}"
    logoutJS = logoutJS & _
            "var container=flyout.closest('.css-18go0ue');" & _
            "if(container&&getComputedStyle(container).display==='none'){" & _
                "container.style.display='block';" & _
                "container.style.opacity='1';" & _
                "container.style.transform='none';}"
    logoutJS = logoutJS & _
            "var candidates=[...flyout.querySelectorAll('button.control,[role=""button""].control')];" & _
            "var textOf=e=>(e.textContent||'').trim();" & _
            "var attr=(e,n)=>(e.getAttribute(n)||'').trim();" & _
            "var btn=candidates.find(b=>textOf(b)==='Sign Out')" & _
                  "||candidates.find(b=>attr(b,'aria-label')==='Sign Out')" & _
                  "||candidates.find(b=>attr(b,'title')==='Sign Out');"
    logoutJS = logoutJS & _
            "if(!btn){" & _
                "console.warn('Could not find a ""Sign Out"" button by text/aria/title within the flyout.');" & _
                "return;}" & _
            "if(btn.hasAttribute('disabled')" & _
                "||attr(btn,'aria-disabled')==='true'){" & _
                "console.warn('""Sign Out"" button is disabled.');" & _
                "return;}"
    logoutJS = logoutJS & _
            "var evt=new MouseEvent('click',{bubbles:true,cancelable:true,view:window});" & _
            "btn.dispatchEvent(evt);" & _
            "}" & _
            "catch(e){" & _
            "console.error('Error clicking Sign Out:',e)" & _
            ";}})();"
'    Debug.Print logoutJS
    Me.WebBrowser1.ExecuteJavascript (logoutJS)
doneClickLogOut:
    Exit Sub
errClickLogOut:
    LogError "ClickLogOut"
    Resume doneClickLogOut
End Sub
Here's the logout code for my site.

It calls two helper functions that pertain to page load delays. The rest is pretty obvious, I think.

Code:
' ============================================================================
' LogoutSite - Navigate back to login page to end the session
' ============================================================================
Private Function LogoutSite(frm As Form) As Boolean
100       On Error GoTo errHandler

110       LogoutSite = False

120       frm.SmarterStats.Navigate SS_LOGIN_URL
130       Call WaitForPageLoad(frm, PAGE_LOAD_TIMEOUT_MS)
140       Call PauseMs(1000)

150       LogoutSite = True

Cleanup:
          
160       On Error Resume Next
170       Exit Function

errHandler:
180       Call GlblErrMsg( _
              sFrm:=Application.VBE.ActiveCodePane.CodeModule, _
              sCtl:="LogoutSite")
190       Resume Cleanup

200       Resume
End Function
 

Users who are viewing this thread

Back
Top Bottom