Combo Box - Please help, going nuts!

NotVeryTechie

Registered User.
Local time
Today, 13:32
Joined
May 20, 2008
Messages
54
Hi there

I hope someone can help before I tear my hair out. I have a combo box that contains a number of fields, but displays only the first in the form (when you select they all show but only the first is shown in the field). Then I have a text box where I want to display the information in column 3 automatically. I have called my combo box cboInfoGvnTeam. Then in the properties of the text box I put the following in Control Source =[cboInfoGvnTeam].[Column](4). I typed it in without the [ ], but it puts it in automatically.

Now to make this worse, yesterday it worked, now it won't. Any ideas?
 
Combo columns are zero based. So the first column is 0 which means the third column is actually column 2 not 4.
 
It shouldn't make a difference. Whether I use column 2 or 3 or 4, it still won't work (have tried them all).
 
Access will insert the [] but these should dissapear when you save the form. The brackets will remain if this isn't a valid reference (spelling mistake, invalid column number, etc).
 
Ok, I am copying the name I gave the combo box from the combo box properties and pasting it into the Control Source of the text box properties. I am adding the = and then the . and the column(2) or whatever. I have five columns and am just concentrating on column(2). So whatever the information in that column, it should appear, right? Well it doesn't. The [ ] makes me think there is something wrong, but I can't figure out what. I am doing this exactly as per an example and not getting it to work.
 
Got me stumped. Can't see anything wrong.
 
Simple Software Solutions

Right lets attach it from the opposite direction.

On the Onclick event of the Combobox use the following code protocol

Me.TextBox0 = me.combobox.Column(0)
Me.TextBox1 = me.combobox.Column(1)
Etc...


CodeMaster::cool:
 
Thankfully a friend found the problem! I had previously tried to write a bit of code for a button on the form and had not deleted all of it properly. That was what was causing the combo box problems!
 

Users who are viewing this thread

Back
Top Bottom