Results 1 to 4 of 4

Thread: [RESOLVED] Fill all combo boxes with data

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    114

    Resolved [RESOLVED] Fill all combo boxes with data

    Thanks to the forums I recieved the answer for filling all textboxes with this code but is there a way to fill all comboboxes as well

    dim ctrl as control
    for each ctrl in controls
    if typeof ctrl is textbox and not trim(ctrl.tag) ="" then
    set ctrl.datasource=rs
    ctrl.datafield=rs.fields(ctrl.tag)
    end if
    next ctrl

  2. #2
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Philippines
    Posts
    468

    Re: Fill all combo boxes with data

    are you populating the combobox with all the value of a fielld??

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    114

    Re: Fill all combo boxes with data

    Yes it is a form with several combo boxes for each record. Each subject has a list of grades.

    Reading
    1. phonics
    2. long vowels
    3. short vowels


    Math
    1. Count to 10
    2. Count to 20
    3. Count to 50


    Each one subject has a combox for each student. I want to be able to pick the grade for each subject from combobox and then have it update database.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Philippines
    Posts
    468

    Re: Fill all combo boxes with data

    Reading
    phonics
    long vowels
    short vowels

    Math
    Count to 10
    Count to 20
    Count to 50

    Each one subject has a combox for each student. I want to be able to pick the grade for each subject from combobox and then have it update database
    are these items in the combobox from a field???(bold with underline)... or it is just a look up table??? if it is just a look up table
    dim ctrl as control
    for each ctrl in controls
    if typeof ctrl is combobox and not trim(ctrl.tag) ="" then
    set ctrl.datasource=rs
    ctrl.datafield=rs.fields(ctrl.tag)
    rs.movefirst
    do while not rs.eof
    ctrl.additem rs.fields(ctrl.tag)
    rs.movenext
    loop

    end if
    next ctrl

Posting Permissions

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



Click Here to Expand Forum to Full Width