Visual Basic, customizing a combo box (1 Viewer)

nh1234

Registered User.
Local time
Today, 06:08
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?
 

edtab

Registered User.
Local time
Today, 14:08
Joined
Mar 30, 2002
Messages
257
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.
 

nh1234

Registered User.
Local time
Today, 06:08
Joined
Dec 27, 2005
Messages
26
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

Top Bottom