Editing contents of Listbox in runtime without right-click (1 Viewer)

Kronix

Registered User.
Local time
Today, 13:23
I want to give my users the ability to add more options to a listbox (or combo box though I'll use the word listbox in this post). I have run into two problems:

1. The listbox control requires me to enter a form that will be called to edit the contents of the list. I would have liked to just edit the table directly that it is based on, but instead I am forced to put the table into a form that will be called by the listbox. The problem is, even though I set the form to Datasheet mode, it always pops up in single record mode. How do I make it appear in Datasheet mode like a table?

2. When running in Runtime mode with right clicks disabled, I am unable to directly use the listbox's built in edit fields function to automatically call the form. I am considering adding a separate button that calls the form manually, but is there a special way to call it so that Access gives the form exclusive pop up properties and automatically refreshes the listbox after closing the form like it does when calling the form from the listbox, or do I have to do all these things manually in VBA?
 

Ranman256

Well-known member
Local time
Today, 07:23
i have a tiny button next to the combo, users click it, it opens the table,
they can add items.
Afterwards, the user must click REFESH ALL button to update the list.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:23
I have an aversion to allowing users to add entries to combos and listboxes on the fly. I won't say that I would never do it because never is a long time but it would be pretty close to never. When you allow users to do this, they have a tendency to add typos. I prefer to restrict the adding of list items to people designated as admins who have a bigger picture and are less likely to be sloppy about adding duplicates with different spelling. However, adding a button such as Ranman suggested will work. BUT, I would NEVER - and that is really NEVER - open a table for the user to update. Always use a form where you have events you can use to prevent deletions and perform validation as needed.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:23
You must create the form first as Datasheet.
You may alsi try its property Default View as datasheet.
 

Users who are viewing this thread

Top Bottom