Search results

  1. A

    calculated field in form

    I am trying to add a calculated Textbox to a form for DueDate The below formula gives a #Type! error Control Source Formula in DueDate: Using the name of the textbox =IIf(IsNull([Text1186]+21),0,([Text1186]+21)) Using the control source =IIf(IsNull([RecieveDate]+21),0,([RecieveDate]+21))...
  2. A

    lookup VBA using one table or more?

    I am creating a lookup on a form that will pull a value only if a column (Inuse) is true. Is it better to have seperate tables for each condition (say 1 and 2) or 1 table with conditions (1 and 2) in it? If one table is preferred does the below look correct? Thank you :). Separate...
  3. A

    export by date

    I am trying to export records to excel that are in a given month based on an input month. The user would select the month with the records desired and click the button to export them to excel. The attached zip file has an image of the database and the code behind the button is: Private Sub...
  4. A

    export button

    I am trying to create a button on an access form that will prompt the user to enter a search month and then export to excel all records in that database that match that month. So, if the user prompt "what month" is October, then THE 30 records in the field [receivedate] that are in october...
  5. 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...
  6. 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...
  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

    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...
  10. 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
  11. A

    calculated field

    Trying to calculate the integer difference between Due_Date and Result_Date excluding weekends and holidays. I have a table (Holidays) with the dates of the holidays in it. The table looks like: ID Description Holiday 1 New Years 1/1/2014 2 New Years 1/1/2015 So, if...
  12. A

    wrong value callculated

    I can not figure out why the below calculates TAT as 5 not 2. Basically, I am trying to calculate a integer number difference from two dates (TAT = Due-Date - Result_Date). The number is calculated and excludes weekends and ideally holidays (for that I have a tblHoliday but not sure how to use...
  13. A

    calculation error

    Trying to create a calculation in a field (text25) that excludes weekends and holidays. I am getting an argument not optional error. Thanks. Me.[Text25] = GetBusinessDay([Due_Date - Result_Date])
  14. A

    date edit

    I have a field on a form that when a check box is checked then the date is populate in a AddDate field. The problem is if the user edits that field the changes do not save. Below is some of the code, how do I save the changes? Thanks. Me.AddDate = Date If Me.Dirty Then 'Save any edits...
  15. A

    calculation incorrect

    I can not figure out why in the attached database the Due Date gets calculated incorrectly (off by 1 day). If text is entered into the HLA ID field the Date Received is 8/16/2014. If then in the test dropdown "STR" is selected, the Due Date is calculated to be 8/19/2014 (should be 8/18/2014)...
  16. A

    date format in VBA

    Me.Day_Received = WeekdayName(Weekday(Date)) The above code shows Friday. What is the correct synatx to display: Friday, 8/15/2014? Thank you.
  17. A

    checkbox not saving

    If a checkbox on a form is selected then a few fields are visible. That seems to work, but when the database is closed and re-openend the edits are not saved in the record. The code is below. Thank you. Private Sub Form_Current() Me.Check275.Visible = Not IsNull(Me.Text246) If...
  18. A

    switch value based on condition

    Is it possible to create a VBA on the AfterUpdate() that flips a value based on a condition? For example, if in a text box (Gender) there is a value of "Male" and in a combo1309 the value is "No", can Gender be switched to "Female" automatically? IF Me.combo1309 = "No" Then...
  19. A

    change code

    If Me.Test = "LR" And Me.Time_Received >= #12:00:00 PM# Then Me.Date_Received = Me.Date_Received + 1 End If If Me.Test = "LR" And Me.Time_Received >= #12:00:00 PM# And Me.Day_Received = "Friday" Then Me.Date_Received = Me.Date_Received + 3 End If If Me.Test = "HR"...
  20. A

    combo-box free text

    I posted this on the modules and VBA but it may be better suited here: How do I allow a user the ability to enter in text into a combo-box so that it saves to that record? Thanks.
Back
Top Bottom