Hi,
I've pulled out so much hair, I swear I'm bald!
I have a jobsheet system & instead of opening the main form, I open a list box on a seperate form first, which displays a query showing open jobs. The user selects one, clicks a button & it closes the list & opens the chosen record in the main form. It does this by creating a recordset clone with a bookmark.
Works a treat. Except now I've added a button that closes a selected job & importantly, keeps the list open. I can't get the list to refresh & remove the closed job! A general search of this forum & others reveals I'm not the only one.
I've tried record set closing & reopening, refresh & requery commands all over the place, but it just won't do it. You click close & it stubbornly stays on the screen. Click it again & you get a VBA error, because of course, the record is no longer in the query.
But, close another record & the first disappears! Close the form & reopen & it's gone as well.
With this in mind, I'd thought I'd try a vulgar piece of programming after 'Close' has been pressed, which uses DoCmd to close the form & reopen it. Makes no difference! If I manually close it & reopen it, it works. Do it through VBA it doesn't.
Any ideas gratefully received...
I've pulled out so much hair, I swear I'm bald!
I have a jobsheet system & instead of opening the main form, I open a list box on a seperate form first, which displays a query showing open jobs. The user selects one, clicks a button & it closes the list & opens the chosen record in the main form. It does this by creating a recordset clone with a bookmark.
Works a treat. Except now I've added a button that closes a selected job & importantly, keeps the list open. I can't get the list to refresh & remove the closed job! A general search of this forum & others reveals I'm not the only one.
I've tried record set closing & reopening, refresh & requery commands all over the place, but it just won't do it. You click close & it stubbornly stays on the screen. Click it again & you get a VBA error, because of course, the record is no longer in the query.
But, close another record & the first disappears! Close the form & reopen & it's gone as well.
With this in mind, I'd thought I'd try a vulgar piece of programming after 'Close' has been pressed, which uses DoCmd to close the form & reopen it. Makes no difference! If I manually close it & reopen it, it works. Do it through VBA it doesn't.
Any ideas gratefully received...