PDA

Click to See Complete Forum and Search --> : [RESOLVED]Records not updating in lstbox after doCmd.RunSQL


deeperdish
Aug 3rd, 2004, 07:30 AM
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.....

RobDog888
Aug 3rd, 2004, 03:37 PM
I think this should help.
Forms![Form1].Requery

deeperdish
Aug 4th, 2004, 03:07 AM
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!

RobDog888
Aug 4th, 2004, 02:42 PM
Can you share your solution with us?