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

RDO Error - Help Needed 1

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
US
I have results in a resultset call RSDistinct. The only thing that I have in RSDistinct are all unique product names (Pname).

I then want to use the resultset Pname in a select statement to form a second result set. That second resultset is Called RSTime. I then take the columns from that, there are several and do some logical testing to see if the product is on time or early. After that is done I clear the RSTime and loop back to the RSDistinct resultset. I then want to continue the process until the end of the RSDistinct resultset is reached. The problem is that I am getting a error when I try to use the pname in a select statement for the second resultset. Here is my code:

sqlTime = "select max(date), status, moved_date, removed_date " _
& "from PRODUCT " _
& "where pname = '& RSDistinct("pname")& "' "


Set RSTime = DB.OpenResultset(sqlTime, rdOpenKeyset, rdConcurRowver)

The error is when I refrence the RSDistinct("pname") it says expected end of statement. I have tried several different ways of doing this but to no luck. Anyone have an idea? Is this legal?
 
Try using RSDistinct!pname or RSDistinct.Fields("pname"). Snaggs
tribesaddict@swbell.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top