Combo box does not update on a split form

avtuvy

Registered User.
Local time
Today, 14:25
Joined
Jan 10, 2010
Messages
39
My application includes a split for which is bound to a query. the code below is supposed to assign a value to a combo box but it does not work correctly (the value is not displayed), the value which I show in my code sample is on the value list. Combo box is supposed to update when a record is selected.

Code:
[FONT=Courier New]Private Sub Form_Current()[/FONT]
[FONT=Courier New]    Me.cmbBase.Value = “Ocean”[/FONT]
[FONT=Courier New]End Sub[/FONT]
 
value lists are problematic and limited. i would urge you to make this 'value list' a separate table called tlkpYourValueListName (including primary key ID and values) and then use a query of that table as the control source.

you will then be able to manipulate, update, change, select to your heart's content.

**disclaimer** i have never used a split form before, so don't know if there's funny stuff going on there in addition to what i know about value lists.
 
Since you're speaking of "split forms" you have to be working in Access 2007 or 2010. Version 2007 saw the introduction of a Multi-Select Property for Combobxes, as Listboxes have had for a number of years. What is the setting for this property? If it is anything except "None" the combobox has no Value hence it cannot be set!

Other things to check is that the combobox name is spelled correctly.
 
Since you're speaking of "split forms" you have to be working in Access 2007 or 2010. Version 2007 saw the introduction of a Multi-Select Property for Combobxes, as Listboxes have had for a number of years. What is the setting for this property? If it is anything except "None" the combobox has no Value hence it cannot be set!

Other things to check is that the combobox name is spelled correctly.

i think i also have to mention, because it might not be obvious - avtuvy, if you are building this database for others to use (network, commercial, other) you have to be aware of what will and won't work in previous versions. split forms, like missinglinq says, was something introduced in office 2007, so it won't appear/work as expected in previous versions.

just putting it out there.
 
I am getting the values for the value list of the combo box from a table and the value that I tried to assign as default was not in the table, once i fixed that all works well. As to the comment that it might not work on other versions of access, I create a distribution package for my app which includes run time libraries.
 
First you need to understand that if the data for the combobox comes from a table, you do not have a Value List! A Value List is made up of values you enter manually when creating your combobox. When you use data from a table or query you are using a Row Source, not a Value List.

As to the comment that it might not work on other versions of access, I create a distribution package for my app which includes run time libraries.

I don't believe including run time libraries are going to allow you to use such things as split forms in a version prior to 2007. Split forms are not part of a run time library, but rather a native function of the newer versions of Access.
 
I don't believe including run time libraries are going to allow you to use such things as split forms in a version prior to 2007. Split forms are not part of a run time library, but rather a native function of the newer versions of Access.

Perhaps they mean that they install the Access 2007 Runtime if a user doesn't have Access 2007, maybe???
 
I am getting the values for the value list of the combo box from a table and the value that I tried to assign as default was not in the table, once i fixed that all works well. As to the comment that it might not work on other versions of access, I create a distribution package for my app which includes run time libraries.

TIP: if your users want to add a value that does not exist, you can use the "Not in list" event to manage additions...
 

Users who are viewing this thread

Back
Top Bottom