Recent content by Hank.School

  1. H

    Returning Sum() from same field with different criteria

    Bingo! That code worked flawlessly. I had seen other queries with the criteria moved to IIF statements but I couldn't figure out how to do it here. Thank you!! I will try to dissect it to figure out using IIF in SQL but I am still pretty far from understanding; I know how the conditional works...
  2. H

    date calculated from a fixed date and a number of days

    Generally you don't store calculated fields but to calculate your new date, you simply: DateAdd("d", 45, "11/1/2019") or try DateAdd("d", [CheckInterval], [DateReceived]) What are you getting from the DateAdd function that isn't working?
  3. H

    Returning Sum() from same field with different criteria

    Attached is a copy of the relevant section... The RPT_Totals uses the other two reports as sub-reports. The RPT_CompTaskHours only shows 2 lines because there are no completed tasks under subpart 3. I have seen various solutions proposed to fix this (and show a line 3 with '0') including the NZ...
  4. H

    Returning Sum() from same field with different criteria

    Well, ALSO a sum of all records under a subpart regardless of the StatusCode... yes. From what I know of Access (and the little SQL I know) I figured it was not possible to include multiple WHERE criteria. Thank you both for confirming that... it would have been a possible way out of the...
  5. H

    Returning Sum() from same field with different criteria

    Do you mean a separate query (either on a subreport or stand alone) which provides the extra data? Yes... that is how I am currently trying to do it but that is causing other problems (with job subparts that have no completed tasks). I thought if I could work it into a single query (Maybe with...
  6. H

    Returning Sum() from same field with different criteria

    Hi guys, Trying to develop what should be a straight forward report but having problems with the queries. Is there a way to return multiple columns in a query with sums of a particular field under different criteria? To be more specific, I am trying to write a query which returns the sum of...
  7. H

    Editing data on a filtered form (Focus problem)

    Ok, I think I fixed it.. it is a little obscure so I don't think it will help others but I will post the issue anyway. My main form selects a job with a combobox (cboJobs) that has its source as the Jobs Table. The jobs table has 4 columns of data but the properties of the combobox only display...
  8. H

    Editing data on a filtered form (Focus problem)

    The only other thing I can think of that could be a factor is that the subform is Linked to the Master by a value in a different combobox (It selects the job). That link is set up manually through an intermediate textbox (since the main form is unbound). The AfterUpdate event of that combobox...
  9. H

    Editing data on a filtered form (Focus problem)

    No timers that I have set, no. If I clear the filter (a command button next to the combobox clears the filter) the focus is fine. I will try to duplicate it in a new DB and see what happens.
  10. H

    Editing data on a filtered form (Focus problem)

    Thanks for replying... It is exactly as described in Post #2 (which you contributed to :)) of the thread I linked. In the AfterUpdate event of my Combobox, I have: [Forms]![FRM_JobTracking]![FRM_JobSiteList].Form.Filter = "[SubPart] = " & Me.cboSubPart...
  11. H

    Editing data on a filtered form (Focus problem)

    Hi guys, I have a subform that is filtered by a combobox on my main form. The subform filter is set and enabled in the AfterUpdate event of the ComboBox as described here: https://access-programmers.co.uk/forums/showthread.php?t=172503 Works fine. The problem is that after the filter is...
  12. H

    Queries with a table of related records

    YES! That works fine, thank you so much. :) When I give the field in the query an alias and select that alias in the textbox binding, it keeps the correct setting and the form displays correctly. Do you know why it wouldn't work without the alias? I know I have done this before and don't...
  13. H

    Queries with a table of related records

    The database is way too big to post (even zipped) but I have stripped everything off except the relevant tables and form. I have confirmed that the database still behaves as described (on my copy of Access at least) Open the form in design view, it is based off of a very simply query. In the...
  14. H

    Queries with a table of related records

    Thanks jdraw, You are very close... Let's say I have a table of Customers, each with a Customer ID. Then let's say I have a table of Meetings which contain fields CustomerA, CustomerB, MeetDate. The fields CustomerA and CustomerB in the Meetings table contain customer IDs from the Customers...
  15. H

    Queries with a table of related records

    Thanks for the reply... I could post the screenshot but, in simplifying, I think I have found the problem. Still don't know why it is happening but I see what is wrong. When I copy the same table twice into the query, the second one gets a '1' appended to the name. If I view the query in...
Top Bottom