Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Apr 2002
    Location
    Bloomsburg, Pennsylvania
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    "distinct" values

    I'm using Access 2000, and selecting distinct values from a table to use in a combo box. It's the combination of 3 fields, the first 2 are text, the 3rd is numeric. The sql looks like this:
    SELECT DISTINCT pcn.cost_center_code, pcn.fund, pcn.fund_num
    FROM pcn;

    Seems very straight forward to me. But the results won't show the 3rd field, fund_num. It appears there is a row for it, but the number doesn't show up in the results. Here is an example of the results.

    12100 D
    12100 E
    12100 E

    They should be
    12100 D 0
    12100 E 0
    12100 E 3

    I can understand why maybe the 0's wouldn't show up, but what about the other numbers?

    Has anyone had any similar problem? I'm not sure what to try. (The field has to stay numeric. I can't change it in the table to be text.)

    Thanks. Frances Donahoe

  2. #2
    Star Lounger
    Join Date
    Feb 2001
    Location
    Wirral, Merseyside, Merseyside, England
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: "distinct" values

    In the properties box on the form field ensure that the Column Count = 3, that the Column Widths have 3 values ie 3;3;3 and the bound column is the correct field.

  3. #3
    Lounger
    Join Date
    Apr 2002
    Location
    Bloomsburg, Pennsylvania
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: "distinct" values

    I'm sorry. I guess I didn't explain very well. When I saw that the 3rd field wasn't being displayed in the combo box, I went in and wrote a new query to test it, and I get the same results. Right out of the query window. At this point I'm not even looking at the combo box, just the query results. Thanks.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: "distinct" values

    Are you sure you have the Show checked for that field in the query? The fact that your query is displaying this ...

    12100 D
    12100 E
    12100 E

    ... with the Distinct keyword says that it is, in fact, reading the third field. Otherwise, you wouldn't see "12100 E" twice.
    Charlotte

Posting Permissions

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