Alpha DevCon 2018
Results 1 to 7 of 7

Thread: Populating List Box

  1. #1
    Member
    Real Name
    eddie dunn
    Join Date
    Mar 2010
    Posts
    8

    Default Populating List Box

    I have minimal ability to work with Alpha Five (v10) but I've managed to figure out how to populate a dropdown listbox dynamically. (ie I've populated the dropdown with the data in field one of a 10 field table) It is beyond my ability though to have it populate with data from only the records where field #8 is blank. (ie and exclude the records where field #8 has any data in it) I do not see an ability to use a filter when choosing the populate source so I'm assuming there is some code that I need to use in xbasic?

    Thank You

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Populating List Box

    If you attach a zipped copy of the database to a reply we can give you specific assistance. In the meantime, here's an example using a record-list combo that's filtered to show only records that have Amount field values greater than 50. You'll find it on the form. Note that the list is bound to a variable, not to a field in my table.

  3. #3
    Member
    Real Name
    eddie dunn
    Join Date
    Mar 2010
    Posts
    8

    Default Re: Populating List Box

    Thank you. I'm going to study your sample with the combo list box and see if I can recreate before I bother you further.
    Thanks again.

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Populating List Box

    Not a bother. Let us know how you get on.

  5. #5
    Member
    Real Name
    eddie dunn
    Join Date
    Mar 2010
    Posts
    8

    Default Re: Populating List Box

    Quote Originally Posted by Tom Cone Jr View Post
    If you attach a zipped copy of the database to a reply we can give you specific assistance. In the meantime, here's an example using a record-list combo that's filtered to show only records that have Amount field values greater than 50. You'll find it on the form. Note that the list is bound to a variable, not to a field in my table.
    Ok, I looked at the sample and tried alot of different things. Although I figured out how to populate the listbox from a database, I simply cannot figure out how to filter the database so that only the data from certain records appear in the listbox.

    I am attaching the two databases involved. You will notice in the "contact info" form there is only one record where the data in the misc field =yup. The goal is to have the listbox in the "image" form reflect only the casename field data from that one record that contains "yup, not the data from all records.

    I would really appreciate any guidance on this.

    Ed

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Populating List Box

    Eddie, unzip the attachment to an empty folder.

    I fixed your table name. Blank spaces are ill advised.

    I enabled a filter expression for the listbox control.

    This does what you asked. Does it help or do you have something else in mind?

  7. #7
    Member
    Real Name
    eddie dunn
    Join Date
    Mar 2010
    Posts
    8

    Default Re: Populating List Box

    Quote Originally Posted by Tom Cone Jr View Post
    Eddie, unzip the attachment to an empty folder.

    I fixed your table name. Blank spaces are ill advised.

    I enabled a filter expression for the listbox control.

    This does what you asked. Does it help or do you have something else in mind?
    Tom, I really appreciate that. I tried my best but just didn't have enough knowledge. It works terrific.

    When you say you fixed table name ("blank spaces are ill advised") I'm not clear on that. I thought my table names were all one word. (although one of the forms was two words)

    Thanks again, this really helps me.

Similar Threads

  1. Initially Populating a List Box ???
    By RobertJWilkins in forum Alpha Five Version 7
    Replies: 8
    Last Post: 02-27-2006, 10:05 AM
  2. populating a list box, syntax?
    By Newton Thomas in forum Alpha Five Version 5
    Replies: 3
    Last Post: 12-09-2004, 05:00 AM
  3. populating a list or combo box
    By Newton Thomas in forum Alpha Five Version 5
    Replies: 1
    Last Post: 10-05-2004, 07:40 AM
  4. Populating Drop Down list
    By Henry Gibbons in forum Alpha Five Version 4
    Replies: 5
    Last Post: 08-25-2002, 01:41 AM
  5. Populating a dropdown list help
    By Jim Dompier in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-04-2001, 04:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •