Hi again there.
I'm trying to edit my Combo box options according to some data I retrieve from database. Since my database is changing, I would like my Combo Box options to be changing accordingly; therefore I am not going to manually type in my data into the Combo attributes (Options). I don't like to use macro.expression either. Is it possible to edit the Options by coding only? The code below is written in onFocusIn. What should I write in the BOLD line?
By the way, my database file extension is MDB and I have already loaded it into PmTable.
Thanks a lot.
[code][/code]
Dim oAxTable,oCombo,n,arr(12)
Set oAxTable = pMe.Items("/axTable").Acx
Set oCombo = pMe.Items("/Combo")
n = oAxTable.Rows
Do
n = n-1
arr(n)= oAxTable.GetCellText(n,2)
Loop While n>0
oCombo.RemoveOptions
oCombo.AddOption "val1=arr(12)"
oCombo.AddOption "val2=Second"
oCombo.AddOption "val3=Third"