dynamically change the order of items in a combo box

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

Guest

I have a table that lists possible billing codes. Each billing code consists
of a # and a description. That table automatically populates my combo box. I
know that I can "ORDER BY" the Billing Code # or the Billing Code
Description, but is there anyway I can have the most commonly selected
billing code at the top of the combo list? (And the others following
sequentially (by # of times selected)? This would of course change every time
someone entered in a new bill. (Can this be done using an aggregate function
query?)
 
In the query behind your combo, use the recordset your updating as the source for the
query... In other words find out how many times a particular BillNo was selected when
creating a new bill. Don't use your BillNo/BillDesc table, use the recordset they apply
to. Say... tblBillings for ex.

BillNo BillDesc BillNoCount
Group Group Count

Sort on BillNoCount Descending.
The most popular BillNo, or BillDesc, will be listed first.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Now the combo will always
 
Thank you so much!! This worked great... and after playing around with it
some more, I was even able to make it better than ever (i.e. having a
"back-up" sorting plan).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top