cancel
Showing results for 
Search instead for 
Did you mean: 

ComboBox

Former Member
0 Kudos

in system form i create the control in combobox selected changed event.

how to find out some controls already exists or not

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Renga,

I think I got your question. on your combo select event , you are adding some controls to form. and you want to check, if they are already there or not, right?

check it with the following code:


Dim i As Integer
            For i = 1 To oform.Items.Count
                If oform.Items.Item(i).UniqueID = "your_control_uniqueid" Then
                    MsgBox("its there")
'--dont create it 
else
'--add the control to form
                End If
            Next

Please intialize your oform variable accordignly before writing this code.

HTH.

regards,

Binita

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I don't think you need to loop the Items collection, you could use Items.Item("itemUID") to try to get the control.

If exception occurs, that means it doesn't exist. Then you can add your own.

Regards,

Jay.

Nussi
Active Contributor
0 Kudos

Renga,

>in system form i create the control in combobox selected changed event.

>how to find out some controls already exists or not

i didn't get your question - can you explain it more clearly ?

regards

David