Combo Box to Text Error

G

Guest

I use a combo box to populate two text fields. The one text field uses the
control source "=(cboStatuteNumber).(Column)(1)". The combo box uses an
adminTable for values. All of the Table values appear in the Combo box, but
some do not appear in the text field. I can switch between values and some
will display in the text box and some will not. I'm lost. Help!
 
G

Guest

The control source indicates where you want the textbox's values bound to.
Doing it the way you have it, text boxes are unbound.
If you want the combobox to fill the text boxes after selection, you need to
do it in the combo's AfterUpdate event.

Also, the correct syntax is:
=cboStatuteNumber.Column(1)

Barry

Barry
 
G

Guest

These are unbound textboxes used to display the 2nd and 3rd columns of the
combobox since the combobox will only display one field. I have used vb
through the AfterUpdate to display these boxes in other projects, but the
=cboStatuteNumber.Column(1) solution seemed simpler. This is the first
failure I've had with this technique and I can't tell why. It started after I
added several items to the adminTable and seems to be only affecting them. I
also upgraded the Access project to SQL tables. I've tried to replace the
textbox with a new creation, but I still get the same affect. I cannot detect
any difference in the adminTable entries that might have some effect. And the
combobox does display all of the adminTables entries perfectly. I'm stumped.
Also, I did the "=cboStatuteNumber.Column(1)" entry but Access converted it
to =[cboStatuteNumber].[Column](1).
Thanks, Jim
 
G

Guest

OK, the problem continues. I've just tried the AfterUpdate solution but I get
a new problem. A msgbox appears with "Update or CancelUpdate without AddNew
or Edit" and the change is stopped. ??

JimMurray said:
These are unbound textboxes used to display the 2nd and 3rd columns of the
combobox since the combobox will only display one field. I have used vb
through the AfterUpdate to display these boxes in other projects, but the
=cboStatuteNumber.Column(1) solution seemed simpler. This is the first
failure I've had with this technique and I can't tell why. It started after I
added several items to the adminTable and seems to be only affecting them. I
also upgraded the Access project to SQL tables. I've tried to replace the
textbox with a new creation, but I still get the same affect. I cannot detect
any difference in the adminTable entries that might have some effect. And the
combobox does display all of the adminTables entries perfectly. I'm stumped.
Also, I did the "=cboStatuteNumber.Column(1)" entry but Access converted it
to =[cboStatuteNumber].[Column](1).
Thanks, Jim

Barry Gilbert said:
The control source indicates where you want the textbox's values bound to.
Doing it the way you have it, text boxes are unbound.
If you want the combobox to fill the text boxes after selection, you need to
do it in the combo's AfterUpdate event.

Also, the correct syntax is:
=cboStatuteNumber.Column(1)

Barry

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top