Combo Box question.

F

Frank Martin

I have a "QryLedgerAccnts" to supply a combo box on a form.

There are 3 fields in this query"

AccountName:

AccountNumber:

AccountID:

The "AccountName" field is first to allow the auto-lookup
feature, and the "AccountID" is the bound field in the combo
box.


I have made the combo box to work except for one small
point. When I have made the combo box selection the
"AccountName" remains in the field, but I want the
"AccountID" to be there. Is this possible?

Frank
 
A

Arvin Meyer [MVP]

Yes, all you need to do is to set the first visible (non 0" width) field to
be AccountID, or you can add a textbox to display any of the columns by
setting the controlsource to the column index (zero based) like:

= cboAccountID.Column(2)

which is the third column.
 
T

Tom van Stiphout

On Sat, 17 Oct 2009 13:28:50 +1100, "Frank Martin" <[email protected]>
wrote:

No.
But you can have an extra field on the form, and set the ControlSource
to:
=myCombobox.Column(2)
(of course you replace myObjectNames with yours)

-Tom.
Microsoft Access MVP
 
F

Frank Martin

Frank Martin said:
I have a "QryLedgerAccnts" to supply a combo box on a form.

There are 3 fields in this query"

AccountName:

AccountNumber:

AccountID:

The "AccountName" field is first to allow the auto-lookup
feature, and the "AccountID" is the bound field in the
combo box.


I have made the combo box to work except for one small
point. When I have made the combo box selection the
"AccountName" remains in the field, but I want the
"AccountID" to be there. Is this possible?

Frank




Thanks, I'll try these.
Frank
 

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