Consulting

Results 1 to 5 of 5

Thread: Select unique value

  1. #1

    Select unique value

    I want to select unique country names from a recordset and now my code is
    [VBA]
    "select distinct country"
    [/VBA]
    The problems is that ASIA and Asia are different, but it only selects one.How can I include both of them?

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    you need to use the LCase statement!

    you supplied your code as "select disitinct country" any chance you can explain how to use this code as it is much shorter than anything i have ever used!

    Regards,
    Simon
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    Sorry about that. It is strSELECT="select distinct country"

  4. #4
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    yn19832, you need to post your code in its entirety!, i was being a little flippant i'm sorry, but in order for you to get help you need to help us help you!, post your code and get the solution you require!

    Regards,
    Simon
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I think you are goint to struglle.

    With SQL Server, it is an insttallation option, but I bet you aren't using SQL Server.

Posting Permissions

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