Combo Box Default

J

JimS

I swear there's a simple way to make the default value of a combo box the
first item in the itemdata list. I can't remember how. Help?
 
C

Clifford Bass

Hi Jim,

Easiest is to place this in the Default Value property (cbTypeCode
being the name of the combo box in this example):

=[cbTypeCode].[Column](0,0)

Clifford Bass
 
D

Douglas J. Steele

I think that will only work if the first column is the bound column,
Clifford. If, for instance, the third column was the bound one, I believe
you'd need to use

=[cbTypeCode].[Column](0,2)

Probably better off to use

=[cbTypeCode].ItemData(0)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Clifford Bass said:
Hi Jim,

Easiest is to place this in the Default Value property (cbTypeCode
being the name of the combo box in this example):

=[cbTypeCode].[Column](0,0)

Clifford Bass

JimS said:
I swear there's a simple way to make the default value of a combo box the
first item in the itemdata list. I can't remember how. Help?
 

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