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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if combobox left null then sort by a particular field name in database

Status
Not open for further replies.

alifyag

MIS
Apr 15, 2002
18
US
hi,
i have a combobox on which i have to carry out a sort.
if the combo box is left blank by the user ( that is he does not select anything from the drop down list) then i want my report to be sorted by the CompanyName field in my database when the user clicks on the print butten. pleeease help.
i tried writing code in the after update event of the combo box but without much luck.
alifya
 
You'd probably be better off to set the Default value on the combo to "CompanyName", and to also set the LimitToList property of the combo to true. That way you avoid the requirement to add extra code.

Hope that helps,
Cheers,
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top