473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

BoundColumn not accessable with VBA ?

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
1 3083
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John | last post by:
The ItemCommand event not getting fired when I add both a BoundColumn and a ButtonColumn to a datagrid. When I add a ButtonColumn by itself, everything works fine, but as soon as I add a...
0
by: cntams | last post by:
Hi all, I have a Web Form and using BoundColumn to bind data to the datagrid. I have 2 fields that needs to be formatted. The first one is a DateTime field and the second one is the currency...
1
by: niki | last post by:
Hello. I have a problem with custom columns inside the datagrid. I've set up a datagrid that populates from a database; I can edit the datagrid values and update the db, so that's ok. (btw, it's...
2
by: tshad | last post by:
Is there a way to call a function from a boundcolumn tag? I have some icons that I set as visible or not depending on values set in my table. I have a Datagrid that I am binding to and after...
3
by: tshad | last post by:
In a datagrid, is there a way to put a tooltip and use a field from the data that is returned from the sql statement to fill it? For example: <asp:BoundColumn DataField="CompanyDesc"...
4
by: Randall Parker | last post by:
Using ASP.Net v1.1 with C#. I have an asp:DataGrid where one column is specified as follows: <asp:BoundColumn HeaderText="Serial" DataField="owner_serial_num"></asp:BoundColumn> I might get...
0
khalidbaloch
by: khalidbaloch | last post by:
i have installed IIS server on my windows xp sp 2 machine .and it is accessable in my local area network ,, i am connected through dsl/cable .i want to make my local webserver accessable on the net...
1
by: rn5a | last post by:
A DataGrid has a BoundColumn which changes to a TextBox when the DataGrid is in the editable mode. The rest of the columns in the DataGrid are TemplateColumns. There's an EditCommandColumn as well....
0
by: mesut | last post by:
Hi colleagues, I'm confused when to use Boundcolumn and when to use TemplateField in ASPX pages. If I use BoundField control how can I get the field value in code behind? If I use BoundField...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.