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

Record at a time processing 1

Status
Not open for further replies.

tonedef

Programmer
May 24, 1999
64
US
Is there a way in Access to do record at a time processing. In other RDBMSs you can use a cursor to accomplish this, but Access does not allow for cursors. I need to pull values from a filtered table a record at a time to do some calculations. No using SUM or AVG or some such function in the SQL will not accomplish what I am doing.<br>
<br>
Similar question -- different aproach. <br>
I have a subform. Is there anyway to access a particular value in the datasheet view (a box in the grid). If I can do this I can accomplish the above using the subform.<br>
<br>

 
The Access equivalent to a cursor is called a recordset. You declare a recordset variable, and then open a recordset on the database by using the OpenRecordset method of the current database, eg<br>
<br>
dim rsData as Recordset<br>
<br>
set rsData = CurrentDB.OpenRecordset(&quot;MY_TABLE_NAME&quot;)<br>
<br>
In the parameter for the OpenRecordset method, you can also use a sql statement. For full details, look it up in Access help.<br>
<br>
There are methods in the recordset object called MoveFirst, MoveLast, MoveNext, MovePrevious, Find, etc which have fairly predictable functions.<br>
<br>
Hope this is useful.<br>
<br>
Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top