recordsets

illy2k

Registered User.
Local time
Today, 22:38
Joined
Apr 21, 2003
Messages
51
can you seearch a second recordset on the info obtained by the first? Lets say I wanted to search rst2 using rst.Fields("SubAccount"), how could I do this?
 
Yes, as long as both recordsets are open at the same time.

rst.Fields("SubAccount") will have a particular value, depending on which record you are at in the recordset. Use the typical Find or Seek commands for whichever field in rst2 you are searching.
 
hey dcx693

I keep getting an error at this part of the code saying, that I have arguments of the wrong type, or are out of acceptable range, or are in conflict with each other. Here is the code:

rst3.Find "[SubAccount] = " & rst2.Fields("SubAccount") & " "​
 
not sure

I don't know how to make the rst2.Fields("SubAccount") into the thing I need to search for. It should be a string but I am not sure how to make it work.
 
Try:
Code:
rst3.Find "[SubAccount] = '" & rst2.Fields("SubAccount") & "'"
if the SubAccount is a text string.
 

Users who are viewing this thread

Back
Top Bottom