Combo - start with "Select a State"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello -

I have a combo box on a form that is fed by a query. Nothing displays in
the combo box until someone clicks the down arrow. I would like to place
something in the top portion of the combo box that reads something like the
"Select a State" type of thing you see all the time on the Internet as the
beginning row for a combo box.

Is there a way to do this in Access?

Any help will be greatly appreciated!
 
Not really. You could use a Union query to display the value like (aircode):

Select "Select a State" As [State] From tblStates Union Select [State] From
tblStates;

That wouldn't display it, but you then could set:

"Select a State"

as the DefaultValue for the combo. The problems are that if a state isn't
selected you have garbage, and the datatype and/or field size property may
fail the table validation. It's best to avoid the problem and just use the
caption to tell the user what to do.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Hi Arvin -

Thanks for responding! The datatype and field size wouldn't be a problem.
I would suppose if I put in an error message if "Select a State" was the
value of the combobox, that would be a work-around for the problem of them
not selecting a state. [Am I thinking of this correctly?]

I think the real problem here would be if my users decide they want the
combobox to be sorted in a different way than it is. I had initially thought
maybe I could just put "Select a State" as Item 1 in the table, but that
won't work because of potential sort order.

Thanks again for your response!
--
Sandy


Arvin Meyer said:
Not really. You could use a Union query to display the value like (aircode):

Select "Select a State" As [State] From tblStates Union Select [State] From
tblStates;

That wouldn't display it, but you then could set:

"Select a State"

as the DefaultValue for the combo. The problems are that if a state isn't
selected you have garbage, and the datatype and/or field size property may
fail the table validation. It's best to avoid the problem and just use the
caption to tell the user what to do.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Sandy said:
Hello -

I have a combo box on a form that is fed by a query. Nothing displays in
the combo box until someone clicks the down arrow. I would like to place
something in the top portion of the combo box that reads something like the
"Select a State" type of thing you see all the time on the Internet as the
beginning row for a combo box.

Is there a way to do this in Access?

Any help will be greatly appreciated!
 
Back
Top