Visual Basic, customizing a combo box

nh1234

Registered User.
Local time
Yesterday, 19:54
Joined
Dec 27, 2005
Messages
26
Hi,

Is there a simple way in visual basic to customize a combo box to update more than one field on a form? Creating a combo box using the wizard only allows for the update of one field. I tried the following VB code:

Me.name = Me.Combo59.column(1)
Me.ID = Me.Combo59.column(2)

It only recognizes the name column and won't populate the ID. Any ideas?
 
If your combo box has two columns (Name and ID), usually
ID comes first before the name. In this case, you would
refer to your ID as Me.Combo.Column(0) and to the Name
as Me.Combo.Column(1).

Combo field columns start with a base of "0", not "1".

Not sure if this is your problem, but without seeing your db,
I am guessing it is.

Hope this helps.
 
Thanks that was very helpful.


edtab said:
If your combo box has two columns (Name and ID), usually
ID comes first before the name. In this case, you would
refer to your ID as Me.Combo.Column(0) and to the Name
as Me.Combo.Column(1).

Combo field columns start with a base of "0", not "1".

Not sure if this is your problem, but without seeing your db,
I am guessing it is.

Hope this helps.
 

Users who are viewing this thread

Back
Top Bottom