07-24-2012, 07:30 AM
Hi Tarik!
Actually, the txtSearchField description for the JavaEdit text box is found in several forms (all of them are search forms), meaning, that this particular text box will differ in its attached text and its developer name for each form. So, I don't think I can add any more specific properties. Although I did find some sort of workaround though:
Also, when I tried doing your suggestion, I encountered an "Unspecified error" runtime error:
Actually, the txtSearchField description for the JavaEdit text box is found in several forms (all of them are search forms), meaning, that this particular text box will differ in its attached text and its developer name for each form. So, I don't think I can add any more specific properties. Although I did find some sort of workaround though:
Code:
Set txtSearchField = Description.Create()
txtSearchField("Class Name").Value = "JavaEdit"
Set objSearchField = objWindow.ChildObjects(txtSearchField)
strAttachedText = objSearchField(0).GetROProperty("attached text")
strDeveloperName = objSearchField(0).GetROProperty("developer name")
' Input the value into the search field
If strDeveloperName <> "" Then
objWindow.JavaEdit("developer name:=" & strDeveloperName).Set valReqdObj
ElseIf strAttachedText <> "" Then
objWindow.JavaEdit("attached text:=" & strAttachedText).Set valReqdObj
End If
Also, when I tried doing your suggestion, I encountered an "Unspecified error" runtime error:
Code:
Set txtSearchField = Description.Create()
txtSearchField("Class Name").Value = "JavaEdit"
Set objSearchField = objWindow.ChildObjects(txtSearchField)
strAttachedText = objSearchField(0).GetROProperty("attached text")
strDeveloperName = objSearchField(0).GetROProperty("developer name")
' Input the value into the search field
If strDeveloperName <> "" Then
objWindow.objSearchField(txtSearchField).Set valReqdObj
ElseIf strAttachedText <> "" Then
objWindow.JavaEdit("attached text:=" & strAttachedText).Set valReqdObj
End If