Hello!
I'm using two select boxes. Is it possible to put the values that is listed in box two in to an access database. An update query.
So that when I pick a selection from box one, and move it in to box two, the values goes in to this string:
update = update column(one, two, three) values('"& a &"','"& b &"', '" & c& "'). Where do I put this code?
Hope you understand what I meen!!
The code I`m using under here I got from zvonko, and it works fine.
script>
function moveSelectedOptions(from,to) {
for (var i=0; ifrom.options.length; i++) {
var o = from.options;
if (o.selected) {
to.options[to.options.length] = new Option( o.text, o.value, false, false);
}
}
for (var i=(from.options.length-1); i>=0; i--) {
var o = from.options;
if (o.selected) {
from.options = null;
}
}
from.selectedIndex = -1;
to.selectedIndex = -1;
}
/script>
table>tr>td>
SELECT NAME="menuitems" style="WIDTH: 150px; HEIGHT: 150px" MULTIPLE SIZE=10 onDblClick="moveSelectedOptions(this.form.menuitems,this.form.selitems)">
%do while not menuRS.EOF%>
option value="%=menuRS("id")%>">%=menuRS("value")%>/option>
%menuRS.movenext
loop%>
/select>
/td>
td align="middle">
<input type="button" Name="BUTTON" onclick="moveSelectedOptions(this.form.menuitems,this.form.selitems)" value="add >>" id="button1" name="button1" style="FONT-WEIGHT: bold">
input type="button" Name="BUTTON" onclick="moveSelectedOptions(this.form.selitems,this.form.menuitems)" value="<< back" id="submit1" name="submit1" style="FONT-WEIGHT: bold">
</td>
td align="left">
SELECT NAME="selitems" MULTIPLE style="WIDTH: 150px; HEIGHT: 150px" SIZE=10 onDblClick="moveSelectedOptions(this.form.selitems,this.form.menuitems)">
%do while not tablRS.EOF%>
option value="%=tablRS("id")%>">%=tablRS("value")%>/option>
%tablRS.movenext
loop%>
/select>
/td>
/tr>
/form>/table>