Results 1 to 4 of 4

Thread: [RESOLVED]Records not updating in lstbox after doCmd.RunSQL

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Location
    London
    Posts
    10

    Lightbulb [RESOLVED]Records not updating in lstbox after doCmd.RunSQL

    I'm (trying) to create a little app in Access to keep track of associates' skills.

    Each associate has a number of skills attached to them.
    So I have a table with associate info and a table with skill info.

    I have a form with 2 list boxes. lstA shows the skills not attached to the associate and lstB shows skills that are attached to the associate.

    When you double click a skill in lstA, it attaches the skill to the associate and re loads the lstboxes to show the changes.
    (I'm executing SQL statements on the tables to do this, and then reloading the lstboxes)

    The thing is, after the SQL has executed and the function to load the listboxes has run, the change is not reflected in the listboxes.
    If I close the form and re-open it, the changes are reflected.

    Is there a way to refresh the listboxes or the form or the underlying recordset?

    Any help appreciated.....
    Last edited by deeperdish; Aug 4th, 2004 at 03:08 AM.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    I think this should help.
    VB Code:
    1. Forms![Form1].Requery
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Location
    London
    Posts
    10
    I've taken a different approach to this and have managed to get it to work just the way I want it to.

    So: Resolved!

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Can you share your solution with us?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width