Click to See Complete Forum and Search --> : nested queries/ordinal position


len
November 2nd, 1999, 12:37 PM
I have four tables in a nested query sql statement. The common field in all these tables is the permit
number. When I try to display the value of the permit in a richtextbox for a particular record,
I get an error of "Item not found in this collection. The help information says the the field is found
in more than one table and that I must reference the display command by the field's ordinal position
in the nested query.
My statement looks like this:

With RichTextBox1
.SelText = vbCrLf & per1!permit
end With

What should the correct syntax be in order to display the permit number for the record?

Lothar Haensler
November 3rd, 1999, 01:46 AM
try
.SelText = yourRecordSetVariable.Fields(NumericIndexOfField)