Welcome to SPN

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

Sign Up Now!

Commas in List Boxes in Tables

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

  1. ehale

    ehale
    Expand Collapse
    Guest

    Hello,

    I need the following values to be available in a list box in a table:

    $1,000,000
    $2,000,000
    $3,000,000
    $1,000,000/$2,000,000
    etc . . .

    Even if I put the values in quotes, the strings are being separated in the
    list by the commas, so the list will show "$1" as the first item, "000" for
    the second, and so on.

    Can anywone share how I can resolve this? I appreciate any help! Thanks.
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    Interfaith Materialists And Its Discontents Interfaith Dialogues Jun 10, 2016
    Sikhi Quasi-Pragmatists And Quasi-Spiritualists, Care To Explain? Sikh Sikhi Sikhism Jun 6, 2016
    Cholesterol Is Finally Officially Removed From "naughty List" Health & Nutrition Feb 11, 2016
    Listening to Gurbani while driving?? Sikh Rehat Maryada Jan 13, 2016

  3. Wayne Morgan

    Wayne Morgan
    Expand Collapse
    Guest

    I just tried this and it worked. The field in the table was defined as Text
    data type and the table was used as the Row Source of a listbox on a form.
    What are the Row Source Type and Row Source properties of your listbox? Was
    is the data type of the field in the table?

    I also tried using them as a Value List in the listbox and they worked ok
    for a listbox on a form and a listbox as a Lookup in a table. The Row Source
    Type has to be set to Value List to do this. Here is a copy of the Row
    Source I used in the table Lookup listbox.

    "$1,000,000";"$2,000,000";"$3,000,000";"$1,000,000/$2,000,000"

    --
    Wayne Morgan
    MS Access MVP


    "ehale" <ehale@discussions.microsoft.com> wrote in message
    news:AB5692B4-0716-4EC5-9207-44391849D1F9@microsoft.com...
    > Hello,
    >
    > I need the following values to be available in a list box in a table:
    >
    > $1,000,000
    > $2,000,000
    > $3,000,000
    > $1,000,000/$2,000,000
    > etc . . .
    >
    > Even if I put the values in quotes, the strings are being separated in the
    > list by the commas, so the list will show "$1" as the first item, "000"
    > for
    > the second, and so on.
    >
    > Can anywone share how I can resolve this? I appreciate any help! Thanks.
     
  4. ehale

    ehale
    Expand Collapse
    Guest

    Hi Wayne!

    You were right, I'm not sure how I did it, but the combo box Row source was
    the $ amounts I listed with no quotes surrounding them, so the commas
    separated the items in the list like I described.

    How do I base the combo box on the field in the table? I tried various
    combinations of things for the control source, row source type and row source
    on the combo box and I'm not getting the right results.

    my table name is tblQuotes
    my field name is tblLiabilityLimit
    my combo box is tblLiabilityLimit

    I appreciate your help very much!



    "Wayne Morgan" wrote:

    > I just tried this and it worked. The field in the table was defined as Text
    > data type and the table was used as the Row Source of a listbox on a form.
    > What are the Row Source Type and Row Source properties of your listbox? Was
    > is the data type of the field in the table?
    >
    > I also tried using them as a Value List in the listbox and they worked ok
    > for a listbox on a form and a listbox as a Lookup in a table. The Row Source
    > Type has to be set to Value List to do this. Here is a copy of the Row
    > Source I used in the table Lookup listbox.
    >
    > "$1,000,000";"$2,000,000";"$3,000,000";"$1,000,000/$2,000,000"
    >
    > --
    > Wayne Morgan
    > MS Access MVP
    >
    >
    > "ehale" <ehale@discussions.microsoft.com> wrote in message
    > news:AB5692B4-0716-4EC5-9207-44391849D1F9@microsoft.com...
    > > Hello,
    > >
    > > I need the following values to be available in a list box in a table:
    > >
    > > $1,000,000
    > > $2,000,000
    > > $3,000,000
    > > $1,000,000/$2,000,000
    > > etc . . .
    > >
    > > Even if I put the values in quotes, the strings are being separated in the
    > > list by the commas, so the list will show "$1" as the first item, "000"
    > > for
    > > the second, and so on.
    > >
    > > Can anywone share how I can resolve this? I appreciate any help! Thanks.

    >
    >
    >
     
  5. Wayne Morgan

    Wayne Morgan
    Expand Collapse
    Guest

    I usually base the Row Source on a query to add sorting. In this case, set
    Row Source Type to Table/Query and the Row Source to

    SELECT tblLiabilityLimit FROM tblQuotes ORDER BY tblLiabilityLimit;

    You can also used a stored query, if so, just enter the name of the query as
    it appears in the database window.

    The number of fields you list are the number of columns available to the
    listbox or combo box. This will appear as listed in the query from left to
    right. On the Format tab of the box's Properties dialog you can set the
    Column Count (number of columns), Column Widths (setting a column to 0 width
    will hide that column), and Column Heads (displays the field name at the top
    of the column). On the Data tab you can set Row Source Type and Row Source,
    Control Source (the field in the form's Record Source where you want to
    store the selection), and Bound Column (the column who's value will be
    stored in the Control Source field).

    --
    Wayne Morgan
    MS Access MVP


    "ehale" <ehale@discussions.microsoft.com> wrote in message
    news:7ED7A602-0E3C-4686-930C-4F2F2F65EC4B@microsoft.com...
    > Hi Wayne!
    >
    > You were right, I'm not sure how I did it, but the combo box Row source
    > was
    > the $ amounts I listed with no quotes surrounding them, so the commas
    > separated the items in the list like I described.
    >
    > How do I base the combo box on the field in the table? I tried various
    > combinations of things for the control source, row source type and row
    > source
    > on the combo box and I'm not getting the right results.
    >
    > my table name is tblQuotes
    > my field name is tblLiabilityLimit
    > my combo box is tblLiabilityLimit
    >
    > I appreciate your help very much!
    >
    >
    >
    > "Wayne Morgan" wrote:
    >
    >> I just tried this and it worked. The field in the table was defined as
    >> Text
    >> data type and the table was used as the Row Source of a listbox on a
    >> form.
    >> What are the Row Source Type and Row Source properties of your listbox?
    >> Was
    >> is the data type of the field in the table?
    >>
    >> I also tried using them as a Value List in the listbox and they worked ok
    >> for a listbox on a form and a listbox as a Lookup in a table. The Row
    >> Source
    >> Type has to be set to Value List to do this. Here is a copy of the Row
    >> Source I used in the table Lookup listbox.
    >>
    >> "$1,000,000";"$2,000,000";"$3,000,000";"$1,000,000/$2,000,000"
    >>
    >> --
    >> Wayne Morgan
    >> MS Access MVP
    >>
    >>
    >> "ehale" <ehale@discussions.microsoft.com> wrote in message
    >> news:AB5692B4-0716-4EC5-9207-44391849D1F9@microsoft.com...
    >> > Hello,
    >> >
    >> > I need the following values to be available in a list box in a table:
    >> >
    >> > $1,000,000
    >> > $2,000,000
    >> > $3,000,000
    >> > $1,000,000/$2,000,000
    >> > etc . . .
    >> >
    >> > Even if I put the values in quotes, the strings are being separated in
    >> > the
    >> > list by the commas, so the list will show "$1" as the first item, "000"
    >> > for
    >> > the second, and so on.
    >> >
    >> > Can anywone share how I can resolve this? I appreciate any help!
    >> > Thanks.

    >>
    >>
    >>
     

Share This Page