Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sort Desc (Access2002)

    Hi!
    I have so much bad data in my Excel file so when it is gets to access table (if ever, I still can not import) I will need to sort it so empty records will be always at the buttom of the list.
    So I am updating these cells with "zUndetermined"

    Do you know better way to populate empty cell that will get it to the end of the recordset?

    Thanks

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

    Re: Sort Desc (Access2002)

    Are you talking about blank values in a single field, or completely blank records?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Desc (Access2002)

    HansV,
    How do you determine that? I take data from Excel file, cells are blank and I am importing it into Access table and it has no value...I don't know. I am running query and populating it with zUndetermined. What can I use that is more suitable and keep it down on the list?

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

    Re: Sort Desc (Access2002)

    You don;t need to update values, you can subtitute "zUndetermined" or whatever in a query without modifying the underlying data: create a calculated column

    <code>FieldNoBlanks: IIf(([FieldWithBlanks] & "")="","zUndetermined",[FieldWithBlanks])</code>

    where FieldWithBlanks is the name of a field. But I don't really understand. Records in an Access table don't have an intrinsic sort order - if you sort the records on another field, the zUndetermined values will end up all over the place.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sort Desc (Access2002)

    When I am running Report I sort by that field and all zUndetermined get to a right place at the botom.
    What you suggesting will give me "FieldWithBlanks" instead of "zUndetermined " ??? If so how will I get it to the bottom??

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

    Re: Sort Desc (Access2002)

    No, it would give you "zUndetermined". "FieldWithBlanks" is the name of the field in the table - you should change it to the actual name of your field.

Posting Permissions

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