Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Frequency of choice (Access 2000)

    I have a combo box to choose products. In the row source of the combo box i have a query :SELECT Products.Productid, Products.Name, Products.casks, Products.cases FROM Products;
    Up to now i had the column Products.Name set into an ascending order.This gave me a list in the alphabetical order of the product.How can i change the ascending order so that to calculate the frequency with which one has
    selected a product.? What i mean is to have the most chosen products to be first in the list

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Frequency of choice (Access 2000)

    How do you define "most chosen products"?
    - Chosen during the current session?
    - Chosen by the current user during all sessions?
    - Chosen during all users during all sessions?
    - The number of times the product occurs in another table, for example an Orders or Order Details table?

  3. #3
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Frequency of choice (Access 2000)

    I think your question hits the core of the problem.The combo box productid is placed in the subform "offerdetails" based on the table "tblofferdetails".The main form is called "offer" based on the table "tbloffers". So i think my answer to your question is : the number of times the product occurs in the table "tblofferdetails".!!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Frequency of choice (Access 2000)

    Create a query based on the table tblOfferDetails and on the products table (tlbProducts?), joined on the field identifying the product (ProductID?).
    Select View | Totals to change the query into a totals query.
    Add ProductID, ProductName and another instance of the ProductID field to the query grid (so ProductID occurs twice)
    Leave the Totals option for the first to fields to the default Group By, and set it to Count for the third field.
    Set the Sort order for the third field to Descending.
    Save this query.
    Set the Row Source property of the combo box to the name of the query.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •