Welcome to SPN

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

Sign Up Now!

Populate a listbox with psudo-data

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

  1. Greenboy

    Greenboy
    Expand Collapse
    Guest

    how would a person populate a listbox with a column that is not related to
    any table.
    all i want to do is type in a number in a textbox(integer) and if it is >=
    75 and <=100, populate the 3rd column with text, "competent" if it's <75
    populate the colum with "not competent".

    the listbox is already populated with information from another table, which
    makes columns 1 and 2.

    thank you.
     
  2. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    What happen if the value is greater then 100?
    What happen hen there is no value in the TextBox?
    Why do you need to add it to the list box?

    Something you can try
    Add to the RowSource of the list box another field

    NewField: IIf(Nz(Forms![FormName]![Textbox],0) Between 75 And 100,
    "competent","not competent")

    On the after update event of the text box write the code to refresh the data
    in the list box
    Me.[ListBoxName].Requery

    If you move between records, then add the requery to the OnCurrent event of
    the form.
    --
    Good Luck
    BS"D


    "Greenboy" wrote:

    > how would a person populate a listbox with a column that is not related to
    > any table.
    > all i want to do is type in a number in a textbox(integer) and if it is >=
    > 75 and <=100, populate the 3rd column with text, "competent" if it's <75
    > populate the colum with "not competent".
    >
    > the listbox is already populated with information from another table, which
    > makes columns 1 and 2.
    >
    > thank you.
     

Share This Page