CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    22

    nested queries/ordinal position

    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?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: nested queries/ordinal position

    try
    .SelText = yourRecordSetVariable.Fields(NumericIndexOfField)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured