Tezcatlipoca
Registered User.
- Local time
- Today, 19:00
- Joined
- Mar 13, 2003
- Messages
- 246
Hi all,
Hokay, I've been toying with this one for a while now, but would greatly appreciate people's advice.
To keep it simple, say I have a form, frmDetails. On this form is an unbound text box, Notes, and a Listbox, ListBox, which is based on a query. The query calls all records in a table, tblNotes, and the first couple of words of the actual data of this field is shown in the Listbox. The user can click on any selection in ListBox, and the field Notes will automatically update itself, allowing the user to read the full notes. So far, so good.
Now let's say I have the Me.Notes.Locked = True property set, and have a button (btnEdit) whose OnClick property sets it to False, thus allowing the user to click a button and edit a record. I also have a second button, btnSave that does some quick validation checks, saves the changes, then switches the field's locked status back to True.
In addition, I have Me.Notes.Locked = True in the form's OnOpen and OnCurrent properties, ensuring that the fields stays locked with the exception of using the Edit button.
All of this works perfectly.
The problem is that when the user has edited the notes, and clicked Save, I want the contents of the Listbox to get automatically updated, showing the changes made by the user. Everything updates properly if you quit the form then return to it, but is there a way to dynamically update?
Hokay, I've been toying with this one for a while now, but would greatly appreciate people's advice.
To keep it simple, say I have a form, frmDetails. On this form is an unbound text box, Notes, and a Listbox, ListBox, which is based on a query. The query calls all records in a table, tblNotes, and the first couple of words of the actual data of this field is shown in the Listbox. The user can click on any selection in ListBox, and the field Notes will automatically update itself, allowing the user to read the full notes. So far, so good.
Now let's say I have the Me.Notes.Locked = True property set, and have a button (btnEdit) whose OnClick property sets it to False, thus allowing the user to click a button and edit a record. I also have a second button, btnSave that does some quick validation checks, saves the changes, then switches the field's locked status back to True.
In addition, I have Me.Notes.Locked = True in the form's OnOpen and OnCurrent properties, ensuring that the fields stays locked with the exception of using the Edit button.
All of this works perfectly.
The problem is that when the user has edited the notes, and clicked Save, I want the contents of the Listbox to get automatically updated, showing the changes made by the user. Everything updates properly if you quit the form then return to it, but is there a way to dynamically update?
Last edited: