Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

query question

Anyone know how i do a query to get the values of a field and exclude duplicates? I want to populate a combo box with a field but don't want duplicates.


thank you for any help in advance.

Comments

  • GogiGogi Member Posts: 258
    : Anyone know how i do a query to get the values of a field and exclude duplicates? I want to populate a combo box with a field but don't want duplicates.
    :
    :
    : thank you for any help in advance.
    :

    Use DISTINCT keyword in your SQL.

    Something like this:
    [code]
    ADO.RecordSource="Select DISTINCT * FROM YourTable"
    ADO.Refresh

    [/code]

    Hope this helps!
    Gogi
  • jamesooooojamesooooo Member Posts: 26
    : : Anyone know how i do a query to get the values of a field and exclude duplicates? I want to populate a combo box with a field but don't want duplicates.
    : :
    : :
    : : thank you for any help in advance.
    : :
    :
    : Use DISTINCT keyword in your SQL.
    :
    : Something like this:
    : [code]
    : ADO.RecordSource="Select DISTINCT * FROM YourTable"
    : ADO.Refresh
    :
    : [/code]

    ah.. Thanks soo much.
    :
    : Hope this helps!
    : Gogi
    :

  • jamesooooojamesooooo Member Posts: 26
    : : : Anyone know how i do a query to get the values of a field and exclude duplicates? I want to populate a combo box with a field but don't want duplicates.
    : : :
    : : :
    : : : thank you for any help in advance.
    : : :
    : :
    : : Use DISTINCT keyword in your SQL.
    : :
    : : Something like this:
    : : [code]
    : : ADO.RecordSource="Select DISTINCT * FROM YourTable"
    : : ADO.Refresh
    : :
    : : [/code]
    That worked perfectly thank you again.
    I have another question. I used to use FileMaker Pro and it had a field type container. does access have a container field? I could cut and paste an image to the field like a bmp,jpg or gif. if not how would you suggest a work around? I would like to include a picture with each record. thank you again in advance for your help.

    James
    : ah.. Thanks soo much.
    : :
    : : Hope this helps!
    : : Gogi
    : :
    :
    :

  • GogiGogi Member Posts: 258
    : : : : Anyone know how i do a query to get the values of a field and exclude duplicates? I want to populate a combo box with a field but don't want duplicates.
    : : : :
    : : : :
    : : : : thank you for any help in advance.
    : : : :
    : : :
    : : : Use DISTINCT keyword in your SQL.
    : : :
    : : : Something like this:
    : : : [code]
    : : : ADO.RecordSource="Select DISTINCT * FROM YourTable"
    : : : ADO.Refresh
    : : :
    : : : [/code]
    : That worked perfectly thank you again.
    : I have another question. I used to use FileMaker Pro and it had a field type container. does access have a container field? I could cut and paste an image to the field like a bmp,jpg or gif. if not how would you suggest a work around? I would like to include a picture with each record. thank you again in advance for your help.
    :
    : James
    : : ah.. Thanks soo much.
    : : :
    : : : Hope this helps!
    : : : Gogi
    : : :
    : :
    : :
    :
    :

    Well,I never used a database to store pictures but I think that you should use OLE Object data type.
    It can store pictures.
    Do some googling.
    Here are two links:
    http://office.microsoft.com/en-us/assistance/HP052802251033.aspx
    http://delphi.about.com/od/database/l/aa030601a.htm

Sign In or Register to comment.