I have two different type of listboxes. One that is static and one that is database driven. When I enter an edit page I want the listbox to display the value that is in the database. I can do this with the static listbox by doing the following:
Sub thisPage_onenter()
if (thisPage.firstEntered) then
if (txtType.value = "A" then
LstType.selectByValue("A"
else if (txtType.value = "B" then
LstType.selectByValue("B"
else if (txtType.value = "C" then
LstType.selectByValue("C"
else
txtType.selectByValue(""
end if
end if
end if
end if
END SUB
I'm not sure if this is the most efficient way to do this, but it works. How would I do a similar thing using a database driven listbox. I tried to do this type of format backwords, but that didn't work:
Sub thisPage_onenter()
if (thisPage.firstEntered) then
LstType.getValue(LstType.selectedIndex)= txtType.value
end if
End Sub
Can anyone give me any direction or help on how to do this.
Thanks,
Sandy
Sub thisPage_onenter()
if (thisPage.firstEntered) then
if (txtType.value = "A" then
LstType.selectByValue("A"
else if (txtType.value = "B" then
LstType.selectByValue("B"
else if (txtType.value = "C" then
LstType.selectByValue("C"
else
txtType.selectByValue(""
end if
end if
end if
end if
END SUB
I'm not sure if this is the most efficient way to do this, but it works. How would I do a similar thing using a database driven listbox. I tried to do this type of format backwords, but that didn't work:
Sub thisPage_onenter()
if (thisPage.firstEntered) then
LstType.getValue(LstType.selectedIndex)= txtType.value
end if
End Sub
Can anyone give me any direction or help on how to do this.
Thanks,
Sandy