Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IMPORTANT: Use VBA to get VALUE of result objects?

Status
Not open for further replies.

mortac8

Programmer
Jun 7, 2001
12
US
Is there any way to get the actual values of result objects (not just the name) using VBA? Please advise!

Any ideas are GREATLY appreciated!


Below: In the BOSDK documentation it describes the Result Class. But it only allows you to get the name of the class and the name of the object...I need the value of the objects.


Dim i As Integer
Dim qry As Query
resultlist = "The results for the first query are:" & Chr(10) & Chr(10)
Set qry = Application.ActiveDocument.DataProviders.Item(1).Queries.Item(1) 'qry is the first query in the Queries collection
For i = 1 To qry.Results.Count 'For the results in the collection
resultlist = resultlist & qry.Results.Item(i).Class & " - " & qry.Results.Item(i).Object & Chr(10) 'and the object
Next i
MsgBox resultlist 'display the results
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top