on 05-28-2008 12:15 PM
in system form i create the control in combobox selected changed event.
how to find out some controls already exists or not
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.