I don know whats going on.. I kinda figured i cannot do this..
but it looks alright..

What am i doing wrong?



VB Code:
  1. Private dbsBlastRoom As Database
  2.  
  3. Private rstDustCollector As Recordset 'DustCollector
  4. Private rstFan As Recordset 'DCFans
  5. Private rstHp As Recordset 'DCMotor
  6.  
  7.  
  8. Private Function CalcPurchParts(dec As tDustCollector)
  9. 'ALREADY SET dB VAR
  10. CalcPurchParts = Recordset("DCFans", rstFan, mDustCollector.Description.m_FanSize)(2) + _
  11.                         Recordset("DCMotor", rstHp, mDustCollector.Description.m_FanHp)(2) 'ERROR ON THIS LINE
  12.                        
  13. End Function
  14.  
  15.  
  16.  
  17.  
  18.  
  19. Private Function Recordset(Table As String, rstVariable As Recordset, itemSeek As Long) As Recordset
  20. Set rstVariable = dbsBlastRoom.OpenRecordset(Table)
  21.     rstVariable.MoveFirst
  22.     rstVariable.Index = "PrimaryKey"
  23.     rstVariable.Seek "=", itemSeek
  24. rstVariable.Close
  25. End Function

Thanks
Seahag
====================