|
-
Feb 18th, 2006, 09:45 AM
#1
Thread Starter
Lively Member
[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
-
Feb 18th, 2006, 10:15 AM
#2
Hyperactive Member
Re: Fill all combo boxes with data
are you populating the combobox with all the value of a fielld??
-
Feb 18th, 2006, 10:48 AM
#3
Thread Starter
Lively Member
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- 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.
-
Feb 18th, 2006, 10:30 PM
#4
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|