J
jeff_carver
In an Access 2000 database, I have a data entry form with a listbox, a
textbox, and a command button. Here's the way it's supposed to work:
- When the user clicks on a row in the listbox, the text from the
row's last column is copied into the textbox.
- The user edits the text in the textbox and clicks the button.
- The button's OnClick event handler updates the underlying record
via ADODB and then calls the listbox's Requery method to show the
results of the update in the applicable row in the listbox.
In reality, the listbox doesn't show the change unless the button is
clicked two or three more times (exception: if I put a breakpoint on
the Requery line in the code and step through it, the listbox displays
the change immediately).
At first I assumed that there was something going on behind the scenes
that was causing the listbox's Requery method to determine that the
data hasn't changed yet and thus no action was required. However,
putting a delay loop before the Requery line didn't make any
difference.
I also tried changing the RowSource value, requerying, changing the
RowSource back to what it was originally, and then requerying again; no
joy there, either.
I'm at a loss. Anyone have an idea how I can fix this?
textbox, and a command button. Here's the way it's supposed to work:
- When the user clicks on a row in the listbox, the text from the
row's last column is copied into the textbox.
- The user edits the text in the textbox and clicks the button.
- The button's OnClick event handler updates the underlying record
via ADODB and then calls the listbox's Requery method to show the
results of the update in the applicable row in the listbox.
In reality, the listbox doesn't show the change unless the button is
clicked two or three more times (exception: if I put a breakpoint on
the Requery line in the code and step through it, the listbox displays
the change immediately).
At first I assumed that there was something going on behind the scenes
that was causing the listbox's Requery method to determine that the
data hasn't changed yet and thus no action was required. However,
putting a delay loop before the Requery line didn't make any
difference.
I also tried changing the RowSource value, requerying, changing the
RowSource back to what it was originally, and then requerying again; no
joy there, either.
I'm at a loss. Anyone have an idea how I can fix this?