Search results

  1. A

    update button

    I would like to place an update button on a form that updates select records in the form. There are several thousands records in a form (Test)... I have an excel file (Data) with three columns in it ID, Call, Date. In the form there are those same fields except there are empty. Is there a way...
  2. A

    form runtime error

    Resolved by changing to: Private Sub Form_Load() Me.TAT = WorkingDays(Due_Date, Result_Date) End Sub not all the records seem to update, but this seemed to work. Thanks.
  3. A

    form runtime error

    Private Sub Form_Open(Cancel As Integer) Me.TAT = WorkingDays(Due_Date, Result_Date) End Sub When I open the form I get a You can't assign a value to this object. I have a function, that excludes weekends and holidays from a calculation. Thanks :). VB Option Compare Database Option...
  4. A

    update calculation

    Say there are 1000 records on a form (Test). Is it possible to create a button or prompt the user for specific records to update? For example, when the button is clicked or the form is opened a prompt "Any records to recalculate" appears. The user enters 800-1000 and clicks ok. Then...
  5. A

    update calculation

    This might be one of those situations as we use the value in this calculated field to track over a 3-month period. If I update the field within access it works perfectly. The problem is often times it is updated outside of access through a linked connection. I don't know the best way to...
  6. A

    update calculation

    My previous thread was related to this, but was relating to the function. Now that is working fine from within the db, it is just a matter of handling values that are from outside the db and using them. Thank you :).
  7. A

    update calculation

    I am having trouble creating a VBA that will update a calculation in a specific field when a form opens. The form is called "Test" and basically I am trying to calculate a field TAT from Due_Date - Result_Date. The calculation works great as long as the user updates within access, a function...
  8. A

    sharepoint to access 2010

    The database is connected to a sharepoint site and when the user enters a Result_date in there TAT on the databas does not populate. However, if the user enters the Result_Date in the database TAT populates. How can I make it populate when the field Result_Date has a value in it no matter if it...
  9. A

    code error

    Is a different event needed? Thanks.
  10. A

    code error

    I am able to use the function now, thank you. The database is connected to a sharepoint site and when the user enters a Result_date in there TAT on the databas does not populate. However, if the user enters the Result_Date in the database TAT populates. How can I make it populate when the...
  11. A

    code error

    I am using the function below to calculate a field that excludes weekends and holidays. The weekends are excluded as it is now, but when I try to add in code to exclude holidays I am getting errors. The code for the holidays is in bold and a couple of the errors are Loop without Do so I remove...
  12. A

    calculation error

    I follow why the function is not working, I just don't know how to fix it. Sorry, I am a scientist trying to learn programming. Thanks :). get_Weekdays([Due_Date] - [Result_Date], 0) If Due_Date is 9/29/2014 Result-Date is 10/1/2014 Then 9/29/2014 - 10/1/2014 = -2
  13. A

    calculation error

    I follow how the code is setup and what it is looking for, but I can not seem to make the necessary changes. Me.[TAT] = get_Weekdays([Due_Date] - [Result_Date], 0) is looking for dates, where did they get changed to integers? Thanks for all your help :).
  14. A

    calculation error

    Public Function get_Weekdays(pstart As Date, pend As Date) As Integer ret=0 ' return value, holds weekdays between pstart and pend ret =7 - Weekday(pstart) ' notes about what this line is doing (defines start as Monday-Sunday) ret = ret + 5 * (DateDiff("ww", pstart, pend) - 1)...
  15. A

    calculation error

    Ok, so I have: Public Function get_Weekdays(ByRef startDate As Date, ByRef endDate As Date) As Integer ret = 0 ' return value of function, 0 by default get_Weekdays = ret End Function then it is called by: Private Sub Result_Date_AfterUpdate() Me.[TAT] =...
  16. A

    user-defined error

    It was just a reference. My database crashed and apparently I forgot to load the ADO reference. Thank you.
  17. A

    user-defined error

    Yes it was highlighted in yellow and Access 2010 is being used. Thanks.
  18. A

    user-defined error

    I am getting the below error on a database that previously worked. Thanks. Dim rst As DAO.Recordset User-defined type not defined
  19. A

    calculation error

    Though your code seems much easier, I am not following it. Your points are valid and make some sense and I have made changes accordingly. If the Due_Date: 9/25/2014 and Result_Date: 9/29/2014 = TAT: 4 (should be 2) Since 9/27 and 9/28 are weekends only that Thursday 9/25 and Friday 9/26 are...
  20. A

    calculated field

    I will continue to post on that thread and apologize.
Back
Top Bottom