Editing a value but its not saving???

mikehextall

Registered User.
Local time
Today, 07:42
Joined
May 22, 2012
Messages
14
Hi guys I hope someone can help me, I have a list of products that I display in a listbox, when I double click a product its details display in the appropriate text boxes for me to edit but when I edit the value in the text box it does not change in the listbox, why is this?

Thanks in advance
 
Do some research on requery. It would appear that the Listbox is populated, then you change a control on the Form ; you must requery the values to be displayed in the Listbox.
 
Do some research on requery. It would appear that the Listbox is populated, then you change a control on the Form ; you must requery the values to be displayed in the Listbox.

I have tried me.list.requery after the textbox update but nothing happens
 
1. Your textbox needs to be bound to the field.
2. The value needs to be force saved.
3. The listbox needs to be requeried.

That's the order of events.
 
1. Your textbox needs to be bound to the field.
2. The value needs to be force saved.
3. The listbox needs to be requeried.

That's the order of events.

Bound and re queried I can do, force saved im not so sure?
 
DoCmd.RunCommand acCmdSaveRecord

Or

If Me.Dirty Then Me.Dirty = False

I prefer number 1.
 
DoCmd.RunCommand acCmdSaveRecord

Or

If Me.Dirty Then Me.Dirty = False

I prefer number 1.

Ok im making progress, I can save and requery but it doesnt alter the record i selected from the list it changes the next entry above it leaving the old entry unchanged and the new entry below???
 
It will save the current record, old or new. If you want to save just an individual piece of data then you need to fire an UPDATE query.
 

Users who are viewing this thread

Back
Top Bottom