Combo Box question.

  • Thread starter Thread starter Frank Martin
  • Start date Start date
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
 
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.
 
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
 
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
 
Back
Top