|
-
January 11th, 2000, 05:46 AM
#1
selecting a data from combo box
HI!
On a form I have a combo box and 6-7 text boxes. The list of items in combo box is a list of names from
a table in SQLServer using ADO connection. Now I want to retrieve data pertaining to the selection made in
combo box and put the data into all the 6-7 text boxes.....I want to basically update a record in a table selected
thru the combo box.
can anybody help?
-
January 13th, 2000, 06:30 AM
#2
Re: selecting a data from combo box
Well if the Field that you are entering in the combo box is name and say it has a primary key asscociated to it..
e.g. No.1,2,3,4,5,6,7 and the corresponding names to it...
and you want to select according to the no then...
on adding the items in the combo...also load an array with the nos. associated to ie..
redim srtmp(0)
artmp(0)=0
i=0
cbtmp.clear
while not rs.eof
cbtemp.additem (name),i
redim preserve artmp(ubound(artmp)+1)
artmp(ubound(artmp)-1)=No
rs.movenext
wend
rs.close
and on combo click event select the respective data by the no in the array
i.e. artmp(cbtmp.ListIndex)
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
|