Compartilhar via


CDaoRecordset::SetPercentPosition

Call this member function to set a value that changes the approximate location of the current record in the recordset object based on a percentage of the records in the recordset.

void SetPercentPosition(
   float fPosition 
);

Parameters

  • fPosition
    A number between 0 and 100.

Remarks

When working with a dynaset-type or snapshot-type recordset, first populate the recordset by moving to the last record before you call SetPercentPosition. If you call SetPercentPosition before fully populating the recordset, the amount of movement is relative to the number of records accessed as indicated by the value of GetRecordCount. You can move to the last record by calling MoveLast.

Once you call SetPercentPosition, the record at the approximate position corresponding to that value becomes current.

Observação

Calling SetPercentPosition to move the current record to a specific record in a recordset is not recommended. Call the SetBookmark member function instead.

For related information, see the topic "PercentPosition Property" in DAO Help.

Requirements

Header: afxdao.h

See Also

Reference

CDaoRecordset Class

Hierarchy Chart

CDaoRecordset::GetPercentPosition

Other Resources

CDaoRecordset Members