Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page