As I have to write a small application that reads and writes a MSAccess database, I thought it would be a good idea to use an DesktopX gadget as frontend, which is quite nice to use.
One problem I got upon is the ActiveX ListBoxControls. I get them filled from a table nicely but I can't assign the value of the database field to them.
This is the code I use :
Filling (works):
...
strQuery = "SELECT * FROM ShopCategories1"
Set RS2 = CreateObject("ADODB.Recordset")
RS2.Open strQuery, Connection, 3, 3
RS2.MoveFirst
While Not RS2.EOF
DesktopX.ScriptObject("DXShopCategory1").Control.AddItem(RS2("ShopCategoryA"))
RS2.MoveNext
Wend
...
Try to give a value to the control from the main-table :
...
DesktopX.ScriptObject("DXShopCategory1").Control.Text = RS("ShopCategory1")
This leaves the control text empty, but the field has a value, which I know for sure.
So, is it not possible to assign a value to the control ?