Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank line in ComboBox

Status
Not open for further replies.

TheRealDeal

Technical User
Nov 16, 2001
187
US
I know I have seen where you can enter a blank line in a combobox, but how would I when the source is a Table/Query?
 
SELECT MyID, MyOtherValue FROM tblYadda

UNION

SELECT 0 AS MyID, "-Select a Value-" AS MyOtherValue, FROM tblYadda

ORDER BY MyOtherValue

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
It is difficult to have a blank line when you are using Table/Query type RowSource. Either you have to add an empty line in the table or paly with the query

To save a null value you can trap events like OnChange with something like

If Combo0.Text = "" Then Combo0 = Null

Best of luck
 
The blanks lines just make it easier to read. If you click the ... button to the right of that box, you get a qbe grid, so there's no problem there at all.



==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top