By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,863 Members | 879 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,863 IT Pros & Developers. It's quick & easy.

BoundColumn not accessable with VBA ?

P: n/a
Hello all,
On my form I have an unbound combobox with with 3 columns. It gets its
values from a query.
On the property sheet of the combobox its BoundColumn property is set to 2
At runtime I want to change the BoundColumn property :

Dim sOndertekenaar1 As String, sFunctieOndertekenaar1 As String
Me!cbxOndertekenaar1.BoundColumn = 1
sOndertekenaar1 = Nz(Trim(Me!cbxOndertekenaar1.Value))
Me!cbxOndertekenaar1.BoundColumn = 3
sFunctieOndertekenaar1 = Nz(Trim(Me!cbxOndertekenaar1.Value))
Me!cbxOndertekenaar1.BoundColumn = 2

When I run it nothing changes, it still gives the value of the second
column, like it was defined in the propertysheet .....
What do I do wrong here ?
Can anybody help ?
Thanks ...
Ronny
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I don't know why it's not working, I've done it before. But a way around
that is to use Me!cbxOndertekenaar1.column(x) - zero based - to get the
desired column value.
"Ronny Sigo" <ro********@skynet.be> wrote in message
news:3f***********************@reader0.news.skynet .be...
Hello all,
On my form I have an unbound combobox with with 3 columns. It gets its
values from a query.
On the property sheet of the combobox its BoundColumn property is set to 2
At runtime I want to change the BoundColumn property :

Dim sOndertekenaar1 As String, sFunctieOndertekenaar1 As String
Me!cbxOndertekenaar1.BoundColumn = 1
sOndertekenaar1 = Nz(Trim(Me!cbxOndertekenaar1.Value))
Me!cbxOndertekenaar1.BoundColumn = 3
sFunctieOndertekenaar1 = Nz(Trim(Me!cbxOndertekenaar1.Value))
Me!cbxOndertekenaar1.BoundColumn = 2

When I run it nothing changes, it still gives the value of the second
column, like it was defined in the propertysheet .....
What do I do wrong here ?
Can anybody help ?
Thanks ...
Ronny

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.