Textbox bound to Listbox column... How to edit data?

  • Thread starter Thread starter Grahammer
  • Start date Start date
G

Grahammer

I have a form that contains a listbox and several textboxes. When the user
selects an item in the listbox the details from that selection are shown in
the textboxes. I would like the user to be able to make changes in the
textboxes to update the data in the table to which the listbox is bound.

The listbox is bound to a table and only column 1 of the table is visible in
the list.

The textboxes are bound to various columns of the listbox, so when the
listbox selection changes, the textboxes automatically update.

The problem is that Access is not allowing me to edit the data found in the
textbox.

The form itself is not bound to any data at all.
 
Well... I found a solution...

- Form is bound to the table.
- Listbox is also bound to the table.
- Textboxes are bound to the various fields of the table used by the form.
- When an item is the listbox is clicked, VBA code applies a filter to the
form based on a unique key in the table. Textboxes update automagically.
- A "new" button is also on the form, which adds a new record to the table.

Seems to work OK.
 
Back
Top