Hello...
I am using ssOleDbDropDown in a grid but have a few problems with it.
I want the user to be able to type the text and then I find the right row in the DropDown (I have several columns in it and the data in them I will then copy to columns in the grid).
But when I try to loop through the rows like this:
Dim i As Integer
For i = 0 To drpArticle.Rows - 1
*drpArticle.Row = i
If Trim$(drpArticle.Columns(0).Text) = Trim$(grdOrdRows.Columns(VISASARTNR).Text) Then
i = drpArticle.Rows
End If
Next
On the row with a star I get runtime Error 381: Invalid Property array index.
I've also tried:
drpArticle.text = grdOrdRows.Columns(VISASARTNR).Text
But that doesn't work since I have more than one column (it works if I have only one). And if I then change that:
drpArticle.Columns(0).text = grdOrdRows.Columns(VISASARTNR).Text
I just create a new row in the DropDown...
I've tried a lot of other things, but nothing seemes to work. Can anyone advice me? I'm in a rather hurry with this (aren't we programmers always in a hurry..)
/Suss
I am using ssOleDbDropDown in a grid but have a few problems with it.
I want the user to be able to type the text and then I find the right row in the DropDown (I have several columns in it and the data in them I will then copy to columns in the grid).
But when I try to loop through the rows like this:
Dim i As Integer
For i = 0 To drpArticle.Rows - 1
*drpArticle.Row = i
If Trim$(drpArticle.Columns(0).Text) = Trim$(grdOrdRows.Columns(VISASARTNR).Text) Then
i = drpArticle.Rows
End If
Next
On the row with a star I get runtime Error 381: Invalid Property array index.
I've also tried:
drpArticle.text = grdOrdRows.Columns(VISASARTNR).Text
But that doesn't work since I have more than one column (it works if I have only one). And if I then change that:
drpArticle.Columns(0).text = grdOrdRows.Columns(VISASARTNR).Text
I just create a new row in the DropDown...
I've tried a lot of other things, but nothing seemes to work. Can anyone advice me? I'm in a rather hurry with this (aren't we programmers always in a hurry..)
/Suss