Re: Database Listing and Sorting

From: Paul S. Ganney (paul.ganney_at_hey.nhs.uk)
Date: 08/20/04

  • Next message: Jeff: "Re: Database Listing and Sorting"
    Date: 20 Aug 2004 03:54:20 -0700
    
    

    "Jeff" <Jeff@discussions.microsoft.com> wrote in message news:<07C743BB-C14B-406B-B3CC-7118C34AC7AF@microsoft.com>...
    > Hello all,
    > (Note: I am a rookie and just filling in)
    >
    > I was wondering if someone could give some quick advice on how to modify the
    > way a List Control Box (IDC_RECORDS) displays the records in a list. As they
    > currently are, the list displays the records, but some of the columns are
    > short, some are long. A few columns are too long and push the others that
    > are need out of view. Also, there is no way to 'sort' the results displayed
    > either, but the user can change the width of the columns.
    >
    > This is coming from an Access database using ODBC so the 'GetRecord'
    > commands are written in SQL statements.
    >
    > Here is a code example:
    >
    > m_records.InsertColumn(0,"Rec",LVCFMT_RIGHT,1,2);
    > m_records.InsertColumn(0,"Total Amount",LVCFMT_RIGHT,100,2);
    > m_records.InsertColumn(0,"Vendor Name" ,LVCFMT_RIGHT,350,1);
    > m_records.InsertColumn(0,"Purchase Order Number" ,LVCFMT_RIGHT,200,0);
    > m_records.InsertColumn(0,"Order Date" ,LVCFMT_RIGHT,100,0);
    >
    > My guess is that if I adjust some of these numbers (100,0) that I could
    > shorten the display. Anyone's help would be greatly appreciated.

    The "100" is the number to change as that's the width of the column.

    Rather than sorting the data after it's arrived, why not get the
    database to do it for you? If you're using CRecordSet-derived classes,
    then all you do is set the m_strSort parameter.

    HTH

    Paul.


  • Next message: Jeff: "Re: Database Listing and Sorting"

    Relevant Pages

    • Database Listing and Sorting
      ... I am a rookie and just filling in) ... I was wondering if someone could give some quick advice on how to modify the ... shorten the display. ...
      (microsoft.public.vc.database)
    • Re: Internet Explorer will not show web pages, Firefox does.
      ... *WARNING* Do NOT follow any advice given by the people listed below. ... No spyware, no firewall SW installed. ... Internet Explorer will not display any web pages, ... with Firefox, and installed IE7. ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: How do I geta hyperlink when using asp and displaying data fro
      ... > But that defeats one of the main reasons to use Access - to display your ... > Access database and the page gets built automatically. ... Note that the hyperlink for the image, and the image source itself are both ...
      (microsoft.public.frontpage.client)
    • Re: microsoft works word processor HELP!!!
      ... In Windows Explorer, when you click the floppy drive, does it display the ... > thanks for the advice I tried what you suggested but its still not ... >> Microsoft Learning ...
      (microsoft.public.word.newusers)
    • Advice needed for Tricky MSHFlexgrid Problem.
      ... I have a slight challenge and I would appreciate your advice on maybe how to ... DB for a number of rows (there could be a large unspecified amount of these.) ... and then pop them into MSHFlexgrid to display all the rows. ... on the cell and potentially update data in the DB. ...
      (microsoft.public.vb.controls)