Search results

  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...
  16. H

    Queries with a table of related records

    [Solved] Queries with a table of related records Hi guys, Having a problem here and I can't seem to figure it out. I have a query that provides records for a form. That query has its primary table which holds associations between records in another table. The query has duplicate 'cascades'...
  17. H

    Preventing alternate methods of saving unvalidated records

    Excellent point, this is exactly what I was looking for! Unfortunately, most of the beginner tutorials I run across simply show code going directly under a Click event and I have been treating validation like any other code related to the button's function. It isn't until you run across...
  18. H

    Preventing alternate methods of saving unvalidated records

    Thank you for the reply but I tend to agree with missinglinq and Pat... I almost never use unbounded forms. It seems to be working around the functionality of Access.
  19. H

    Preventing alternate methods of saving unvalidated records

    The validation of the record being edited on the form (the associated record) is done in a command click event. I have always tended to put the majority of the processing code in command click events but I never realized (until recently) that closing the form in other ways would update the table...
  20. H

    Preventing alternate methods of saving unvalidated records

    I have a form that does some checking in a Command_Click event to see if the associated record is valid to be updated. Everything works fine EXCEPT that the user can still save an unverified record by changing some of the fields and hitting SHIFT+ENTER. I have looked around and it seems the...
Top Bottom