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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't retrieve 2nd field in a record

Status
Not open for further replies.

sysr

Technical User
Aug 17, 2001
17
CA
I have the following code in the middle of a loop, each line of code is surrounded by the < percentage symbols >, and I am outputting to an active server page (if that matters?).

I can get the first field in a record with:

=RS(&quot;OrganizationName&quot;)

but when I try for a second field I get an error:

=RS(&quot;OrganizationName&quot;)
=RS(&quot;Region&quot;)

&quot;ADO could not find the object in the collection&quot;

The field name is spelled right and there are no hidden spaces, when I do the following it also works fine, although I don't need the same name twice.

=RS(&quot;OrganizationName&quot;)
=RS(&quot;OrganizationName&quot;)

Any help would be appreciated.


 
sounds like may you are specify only the one field in your &quot;Select&quot; statement
try this
&quot;Select * From Tablename Where ...

The asterisk is for &quot;All&quot; fields
I usuallly use that if the field list is small
If you have 100 fields or so then specify each one separated by a comma

&quot;Select OrganizationName, Region, Field3, Field4 From Tablename Where ....

Also if you have a Join query and the OrganizationName is in there twice like so:
Mytable.OrganizationName and YourTable.OrganizationName

then you have to specify which table like so
=RS!Mytable.OrganizationName
=RS!YourTable.OrganizationName
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top