Instructions in Combo Box

  • Thread starter Thread starter rm
  • Start date Start date
R

rm

How do I place the text "Select Criteria Here" (or some smilar
message) in a combobox that has a sql statement as a row source and
limit to list is on/true?
 
How do I place the text "Select Criteria Here" (or some smilar
message) in a combobox that has a sql statement as a row source and
limit to list is on/true?

I hope to not receive the suggestion of storing "Select Criteria Here"
in my table. Thanks.
 
Why would you want to do that? Why not just use the Tool Tip property for the
control, and when they hover the mouse pointer over the control, your text
appears.
 
That is a god sugestion. However I would like the text displayed up to
the point where the user sets focus to the combo box.
 
You can use a Union Query to do exactly that. I don't know what your SQL
looks like, but here is an example from one of my apps where the user can
select a specific record or All records. Of course, in all my event code I
have to check for that value being the current value of the combo:

SELECT DISTINCT Client.ClientID, Client.ClientName FROM (Client LEFT JOIN
Property ON Client.ClientID = Property.PropertyClientID) LEFT JOIN Contract
ON Property.PropertyID = Contract.ContractPropID WHERE
(((Contract.ContractType)="D")) AND Contract.ContractStatus LIKE
IIf(Forms!frmSubMtrInstMgr!cboStatus = "
","*",Forms!frmSubMtrInstMgr!cboStatus) ORDER BY Client.ClientName UNION
SELECT " " As Client, "[All Clients]" As ClientName FROM Client;
 
Back
Top