Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

combo box not refreshing in VB

  • 02-02-2004 10:16am
    #1
    Closed Accounts Posts: 1,152 ✭✭✭


    hi all,
    im having this problem with a combobox in my VB app in that it wont refresh when i delete a record from the database. For example, the combo box holds a list of Identification numbers. when i delete a whole record in the db the deleted id number still appears in the combo box. any ideas how i can refresh the combobox after the deletion code?

    thanks


Comments

  • Registered Users, Registered Users 2 Posts: 3,312 ✭✭✭mr_angry


    Right after the deletion code, try the following:

    myCombo.requery()

    That should probably sort it.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by mr_angry
    myCombo.requery()
    Or in VB you might try Combo1.Refresh instead...


  • Registered Users, Registered Users 2 Posts: 2,934 ✭✭✭egan007


    just call the piece of code that populates your combobox after deletion


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by egan007
    just call the piece of code that populates your combobox after deletion
    You're assuming he's not using the VB data control.


  • Registered Users, Registered Users 2 Posts: 2,934 ✭✭✭egan007


    i assume no one uses that - it's the most unflexable ever!!


  • Advertisement
  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by egan007
    i assume no one uses that - it's the most unflexable ever!!
    True, but newbies often use it until they know better.


  • Registered Users, Registered Users 2 Posts: 3,312 ✭✭✭mr_angry


    Originally posted by The Corinthian
    Or in VB you might try Combo1.Refresh instead...

    Dammit - too much VBA in my head. I've almost forgotten all the benefits of VB6!


  • Closed Accounts Posts: 1,152 ✭✭✭sound_wave


    thanks lads.


Advertisement