Edit entries(List) of Combo Box (1 Viewer)

racdata

Registered User.
Local time
Today, 14:24
Joined
Oct 30, 2002
Messages
74
When I tried to edit or add an entry of the combo box, Access stop and reload the database. Access don't display any error message.
I re-install Office but it stays the same. Did anybody experience such a problem and what is the solution.
 

Attachments

  • Error01.JPG
    Error01.JPG
    31.4 KB · Views: 169
  • Error02.JPG
    Error02.JPG
    25.3 KB · Views: 160

CarlettoFed

Member
Local time
Today, 13:24
Joined
Jun 10, 2020
Messages
119
To give you an answer it would be necessary to have the file available to check if the error occurs.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 12:24
Joined
Sep 12, 2006
Messages
15,658
try a comma as the separator rather than the semi colon.
I take it you are in design mode with no code running in the background?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:24
Joined
Feb 19, 2002
Messages
43,293
Use a table rather than a list if you have a list that can change. I've attached a mini-app that I use in all my applications to manage simple tables.
 

Attachments

  • TableMaintExample20210204.zip
    196 KB · Views: 156

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 12:24
Joined
Sep 12, 2006
Messages
15,658
With a value list, you can change the list in code.

MyComboBox.rowsource = "a new list"

maybe you then need either
MyComboBox.requery OR
DoEvents OR even
nothing at all


But you wouldn't stop the app, and redesign the combo box to change the rowsource. You could, but that is re-designing the database.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 12:24
Joined
Sep 12, 2006
Messages
15,658
gemma, does that work with an .accde?
I thought I had better check, although I was sure it does, and it did.
You can't save the value list as a design change, but you can change the value list at run-time.
Try this simple demo. This is an mdb, but make it a mde.
 

Attachments

  • LIstBoxDemo.mdb
    156 KB · Views: 154

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:24
Joined
Feb 19, 2002
Messages
43,293
Thanks I was pretty sure you couldn't save the value list at run time in an .accde or when running under the Runtime engine which is why I would not recommend that method.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 12:24
Joined
Sep 12, 2006
Messages
15,658
Thanks I was pretty sure you couldn't save the value list at run time in an .accde or when running under the Runtime engine which is why I would not recommend that method.
As the OP was editing the row source directly, I assumed he just wanted to be able to change the list without going into design mode.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:24
Joined
Feb 19, 2002
Messages
43,293
@racdata, If you are trying to edit the rowsource of the combo and save it while the form is open, keep in mind that you can't do this if your users are running an .accde or using the Access Runtime. Look at the sample I posted of how to manage simple lookup tables.
 

Users who are viewing this thread

Top Bottom