Default value for combo box

  • Thread starter Thread starter blinton25
  • Start date Start date
B

blinton25

Hello,

I have a combo box whose row source is a query which
returns a single value, companyname. Currently when I
create a new record I have to manually select the
companyname returned from the combobox, but I would like
this to appear in the combobox by default. How do I
achieve this? I am not averse to using a Text box since
the combo box never contains more than one value.
 
Set the DefaultValue property of the combo box (in design view of Form) to
this:

=[comboboxname].ItemData(0)
 
Hi,

That worked, thanks.
-----Original Message-----
Set the DefaultValue property of the combo box (in design view of Form) to
this:

=[comboboxname].ItemData(0)

--

Ken Snell
<MS ACCESS MVP>

blinton25 said:
Hello,

I have a combo box whose row source is a query which
returns a single value, companyname. Currently when I
create a new record I have to manually select the
companyname returned from the combobox, but I would like
this to appear in the combobox by default. How do I
achieve this? I am not averse to using a Text box since
the combo box never contains more than one value.


.
 
Back
Top