Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

combobox with unreapted entries

Discussion in 'Information Technology' started by Khoshravan, Jul 28, 2006.

  1. Khoshravan

    Khoshravan
    Expand Collapse
    Guest

    I have a text field in my table called "category". In lookup tab in
    design view I made it combo box. In a form based on that table I select
    category and changed its type to combobox. It asked for source and I
    made a query based on category ( I am not sure about this part but I
    remeber it asked for such a thing and I made a query. Although now that
    I look to query, I do not see anything). Category field in Form, works
    fine but brings all my inputs. some of them are repeated entries. Also
    it doesn't bring new entries. Only brings entries before I the change
    (change the category field to combo box) I want the combox in form to
    bring them only once (if they are more than one, summarize them and
    bring only the summary in the combo box) Is this possible?
    The reason that I want to do this is: I want to make a list of my
    categories. At start I have no idea how to establish my categories. In
    this way I want to input categories as I go ahead and finally I make
    the category list. So I want to be able to input to this field
    (category) and in some cases select from it.
    TIA
     
  2. Glen

    Glen
    Expand Collapse
    Guest

    Good morning Khoshravan. If I understand you correctly, it sounds like
    a query problem. When you created your query, did you run it? If so,
    did it give you the results you were looking for in the output table?
    For your combobox, did you define the data rowsource property with a
    SQL statement or did you use the query name as your data source? What
    you want to do is possible. It sounds like you are simply looking for
    the distinct items in your 'category' table.
     
  3. Khoshravan

    Khoshravan
    Expand Collapse
    Guest

    What I do is as follows:
    Table:
    Field name: Category (text type) in its lookup tab, I change the
    control to Combobox and second box (I suppose value type- sorry I am
    using Japanese version and names are in Japanese) to "Field List".
    In query I do nothing and I do not run it
    In form I change followings:
    File type: to Combobox by right-click
    Field value to Field list (same as definition in table)
    Value source to select from above table
    Basically I think it is the same issue as you mentioned: looking for
    distinct items in my category table.
    Will be happy to have your comments.
     
  4. Glen

    Glen
    Expand Collapse
    Guest

    Sorry for the delay. Been out of the office. We might experience some
    language difficulties here but I am willing to try. I doubt the SQL
    statements I use will work for Japanese version but I use something
    like this to get distinct values:

    SELECT DISTINCT [category] FROM [categorytable]

    I place this code into the data property "Row Source" to get the
    results.
     
  5. Khoshravan

    Khoshravan
    Expand Collapse
    Guest

    Dear Glen
    Thanks for your reply and sorry for delay in response. I read your
    email today. let me think about your solution and reach you again.
    thanks again

    Glen wrote:
    > Sorry for the delay. Been out of the office. We might experience some
    > language difficulties here but I am willing to try. I doubt the SQL
    > statements I use will work for Japanese version but I use something
    > like this to get distinct values:
    >
    > SELECT DISTINCT [category] FROM [categorytable]
    >
    > I place this code into the data property "Row Source" to get the
    > results.
     

Share This Page