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

Recent content by Ravenous1

  1. Ravenous1

    Access Data Manipulation Question

    I like the direction others have pointed you in. I think a hybrid of both Hneal98's and PHV's might work well for you: Sub testfunct() Dim MyString As String Dim MyName As String Dim MyPhone As String Dim BreakLoc As Integer Dim rsFixFullName as DAO.Recordset Dim strSQL As String...
  2. Ravenous1

    Is There a VB code to calculate Depreciation?

    The important thing is that you got what you needed. Good luck!!!
  3. Ravenous1

    Access Data Manipulation Question

    What is the original source of the data? I've seen problems like this with data imported from a text source, where the import specs didn't appropriately account for how the fields were delimited in the text file...
  4. Ravenous1

    Is There a VB code to calculate Depreciation?

    We may be talking about two different things. The book value in accounting actually refers to undepreciated cost of a fixed asset at a given point in time - not the "blue book" value. Moreover, depreciation is calculated from the actual cost of an asset - not its value - from the time you...
  5. Ravenous1

    Check for empty recordset

    Like PHV said: Dim rs As DAO.Recordset Dim db As DAO.Database Dim strSQL As String strSQL = "SELECT * FROM Orders o WHERE o.[OrderID] = 9999" Set db = CurrentDb Set rs = db.OpenRecordset(strSQL) If (rs.BOF And rs.EOF) Then MsgBox "rst empty..." End If
  6. Ravenous1

    Is There a VB code to calculate Depreciation?

    Raskew has a point about the DateDiff. However, you should also consider typical accounting practices for your put in service date. Typically, if you put an asset in service the 1st half of the month, you can calculate its accumulated depreciation the same as if you put it in service on the...
  7. Ravenous1

    Is There a VB code to calculate Depreciation?

    Sorry, I didn't piece everything together to understand what you needed until I read your last couple of responses. As I now understand it, you want an automated means of calculating the declining book value (i.e. cost minus accumulated depreciation) for a given month. Therefore, Remou's...
  8. Ravenous1

    Access.Application Object question?

    You say that you are opening the second database to run a function in it? Do you also require data from the tables in the second database? I agree with EasyIt's post; don't use another application object. Instead, you might work with a workspace object, create two database objects, assign the...
  9. Ravenous1

    Is There a VB code to calculate Depreciation?

    There are two VB financial functions that I believe you could use here: SYD (for Sum of Years'Digits depreciation method) and SLN (for Straight Line depreciation - probably fits better for your example). SYD takes 4 arguments: cost (i.e. initial cost of object) salvage (i.e...

Part and Inventory Search

Back
Top