Update ComboBox rowsource with Value List (1 Viewer)

Shinta

Registered User.
Local time
Today, 02:16
Joined
Jan 11, 2012
Messages
48
Greetings:

I've searching in the web for a while and perhaps I've been foolish, but I cannot find a concrete answer for my issue.
At Microsoft online Access API site, says that if I've a ComboBox with a rowsource as Value List, I can update it's values via VBA with a list of items (a String), in which its elements are separated by a semicolon (";")
https://docs.microsoft.com/en-us/office/vba/api/access.combobox.rowsource

I even found an example on the web that confirms this. Still, I just cannot make it to work.
https://stackoverflow.com/questions...ow-source-of-a-bounded-combo-box-in-ms-access

I've created an Access DB which shows this scenario (attached to this message), in which I've two ComboBoxes; one which triggers an event and tries to update the Value List of a second ComboBox. I guess that I'm missing a basic concept for this to not work...

Thanks a lot in advanced for your interest and help.
 

Attachments

  • ValueList.zip
    36.9 KB · Views: 236
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 08:16
Joined
Sep 21, 2011
Messages
14,050
It works if the combo is not bound?

Plus who puts the first combo dependent on the second combo?, normally the other way around?
 

Shinta

Registered User.
Local time
Today, 02:16
Joined
Jan 11, 2012
Messages
48
It works if the combo is not bound?

Greetings... yes, it works if the affected ComboBox is unbound; any way for it to work if the ComboBox is bounded to a Table (besides using a query, that is)? or is this part of the Access definitions and there is no way around?

Thanks for the quick response :)
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:16
Joined
Sep 21, 2011
Messages
14,050
No idea. I have rarely used value lists.
Also I could not find where the A,B,C came from when I cleared them from the properties.?

I seem to recall there is some feature/bug where they are remembered.? :-(

Best wait for an expert.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:16
Joined
Oct 29, 2018
Messages
21,358
I seem to recall there is some feature/bug where they are remembered.? :-(
Sorry, I can't download the attached file right now, but are you two maybe talking about this?
Sent from phone...
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:16
Joined
Sep 21, 2011
Messages
14,050
Sorry, I can't download the attached file right now, but are you two maybe talking about this?
Sent from phone...
That could well be the article I am thinking of @theDBguy (y)
 

Shinta

Registered User.
Local time
Today, 02:16
Joined
Jan 11, 2012
Messages
48
Hello again...

So, I've downloaded the "Zombies ComboBox"... and well, I can't get pretty well the use of it. I mean... is this related to the Value List issue I posted in the beginning of this thread? or is it more related to Gasman's concern of a "feature/bug" natural to Access's ComboBoxes?

Sorry if I just can't connect this last posts with the subject here...
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:16
Joined
Sep 21, 2011
Messages
14,050
I believe it is re my comment. However it will perhaps interfere in what you are attempting?
I know you were just trying out the logic, but I would also go for a table for the sources.
 

June7

AWF VIP
Local time
Today, 00:16
Joined
Mar 9, 2014
Messages
5,424
Database was just a demonstration of issue, not intended for practical application.

Again, advise to use a table as data source

Also advise not to build lookup fields in table.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:16
Joined
Oct 29, 2018
Messages
21,358
Hello again...

So, I've downloaded the "Zombies ComboBox"... and well, I can't get pretty well the use of it. I mean... is this related to the Value List issue I posted in the beginning of this thread? or is it more related to Gasman's concern of a "feature/bug" natural to Access's ComboBoxes?

Sorry if I just can't connect this last posts with the subject here...
Hi. I finally had a chance to download your file. Please see the attached modified version of your db. The Gremlins/Zombies puzzle was applicable to your situation. Cheers!
 

Attachments

  • ValueList.zip
    28.8 KB · Views: 260

MajP

You've got your good things, and you've got mine.
Local time
Today, 04:16
Joined
May 21, 2018
Messages
8,463
ComboBox.InheritValueList property (Access)
  • gets or sets whether a combo box's value list is inherited from its field. Read/write Boolean.
Syntax
expression.InheritValueList

expression A variable that represents a ComboBox object.

Remarks
The InheritValueList property is effective only when the combo box is bound to a Lookup field and the RowSourceType property is set to Value List.
Could there be a dumber property?
 

Users who are viewing this thread

Top Bottom