SpiritedAway
Registered User.
- Local time
- Today, 08:27
- Joined
- Sep 17, 2009
- Messages
- 97
Update a Listbox
Hi,
I have a form, FRMTrack that holds a Listbox called [Documents] - the data is drawn from a query, QRYTRACK -
When I double click an entry in the Listbox it takes me to the correct record where I can then modify the existing record or add a new record. This form is called FrmData.
On the onclose event I have this bit of code:
Private Sub Form_Close()
Forms![FrmTrack].Requery
End Sub
Thinking that when I close FrmData, the modified or new record would be added or changed in my Listbox, but this is not the case.
From what I've identified is that the table, tblTrack is being updated with changes but not QRYTrack which is where Listbox draws its row source data from.
Can anyone tell me how, after modifying or adding data in FrmData, for it to automatically update to show these changes in my Listbox as well.
Thanks
SpiritedAway
Hi,
I have a form, FRMTrack that holds a Listbox called [Documents] - the data is drawn from a query, QRYTRACK -
When I double click an entry in the Listbox it takes me to the correct record where I can then modify the existing record or add a new record. This form is called FrmData.
On the onclose event I have this bit of code:
Private Sub Form_Close()
Forms![FrmTrack].Requery
End Sub
Thinking that when I close FrmData, the modified or new record would be added or changed in my Listbox, but this is not the case.
From what I've identified is that the table, tblTrack is being updated with changes but not QRYTrack which is where Listbox draws its row source data from.
Can anyone tell me how, after modifying or adding data in FrmData, for it to automatically update to show these changes in my Listbox as well.
Thanks
SpiritedAway
Last edited: