General information
Category:
Forms & Form designer
Title:
Can't assign an Array to Combo Rowsource
this can't be rocket science and I'm sure I've done it elsewhere but I can't seem to find a working example. The following code appears to work, but I'm not seeing anything in the popup:
attachfile=Getfile()
If Empty(Thisform.popattached.RowSource)
Public Array parray(1)
Else
Dimension parray(Alen(parray)+1)
Endif
If Not Empty(attachfile)
If Empty(parray(Alen(parray)))
parray(Alen(parray))=attachfile
Endif
Endif
If Empty(Thisform.popattached.RowSource)
Thisform.popattached.RowSource=parray
Thisform.popattached.RowSourceType= 5
Endif
Thisform.popattached.Requery
Thisform.Refresh
I can see all the values being properly assigned and stored in the array. The value of the rowsource is confusing me. Instead of showing "parray" the name of the array that I've assigned to rowsource, I'm getting the first row of the array only.
Presumably I'm doing something stupid and I would welcome someone putting me out of my misery.
Thanks
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only