Search results

  1. adhoustonj

    Updateable Bound Forms with Denormalized Data with Pat Hartman

    I wish I could have attended this! Hopefully there will be a recording posted so that I can catch up.
  2. adhoustonj

    Sum pivot query troubles

    Got it! Thanks for all the help @plog Couldn't have done it without you. :cool:(y) TRANSFORM Sum(Nz(g.secs1,0)+Nz(h.secs2,0)) AS task_secs SELECT g.stat_id, g.pcd_id FROM (SELECT c.stat_id, c.mdtl_id, c.pcd_id, f.secs1 FROM ( SELECT a.stat_id, b.mdtl_id, a.pcd_id FROM (SELECT DISTINCT...
  3. adhoustonj

    Sum pivot query troubles

    Sorry - There were two examples in post #9 - pcd_id = 131, stat_id = 18 that was where the 113 came from that you picked up on post #10. In the 2nd example - that stat_id = 18 had all records with mdtl_id = Null. The query you originally suggested was working okay until there is a station with...
  4. adhoustonj

    Sum pivot query troubles

    Below are my comments: In tblTasks there are 10 records where pcd_id= 131 and stat_id = 14. 0 have mdtl_id = 2 so you will never get results for that * so I want it to sum all of the task_secs that are null, or have mdtl_id = 2, which there are 0. Return value 74 8 have mdtl_id = NULL and if...
  5. adhoustonj

    Sum pivot query troubles

    pcd_id 130 doesn't have any mdtl_id values to populate columns with, so unless I look at calling the null mdtl_id something like "standard" and then it would populate a "standard" model column with the value when I pivot. The <> column is fine for now. Two other example: pcd_id = 131, stat_id =...
  6. adhoustonj

    Sum pivot query troubles

    If i eliminate the nulls then I do not get all the stations. So I had the iif statement to not sum up the stations with no models returned from qry1 with the null model stations in qry2. I am trying to carry the null value into the model columns - like stat_id 18 needs to have 113 returned for...
  7. adhoustonj

    Sum pivot query troubles

    I am a lot closer here. I'm uploading a demo db with my queries. Where I'm at with the pivot query after walking through the above queries outlined: I may have used a bad example with not including a station with no model variant, but I do need to carry that over if the station has no model...
  8. adhoustonj

    Sum pivot query troubles

    Big thanks for getting my gears spinning here Plog. Am I following correclty? SELECT a.station_id, a.model, a.tasksecs + b.sec2 as tasksecs FROM( SELECT station_id, model, sum(tasksecs) as tasksecs FROM tblTasks GROUP BY station_id, model ) as a LEFT JOIN ( SELECT station_id, sum(tasksecs) as...
  9. adhoustonj

    Sum pivot query troubles

    Hello AWF, I have a task table like below, and I am trying to write a query that returns the 2nd table below. I need to sum up the task_secs by station and have a column for each model. The by model sum includes each task_secs where there is no model. So for station 1 model 1 - it will sum the...
  10. adhoustonj

    Count # of CERTAIN files in a folder but not one by one

    I'm going to throw an excel solution out there - I know this is in the modules & VBA Access category, but maybe excel can fit your requirements. Steps: 1. Open new excel workbook 2. Click data tab 3. Click get data button -> from file -> from folder 4. Select starting folder location you want...
  11. adhoustonj

    What's your best/worst joke?

    They stole my copy of microsoft office so they have my microsoft word. Bad jokes early in the morning ha.
  12. adhoustonj

    What's your best/worst joke?

    Ha! That is a solid one. To the person who stole my copy of Microsoft office, I will find you. You have my word.
  13. adhoustonj

    What's your best/worst joke?

    What is brown and sticky?
  14. adhoustonj

    Solved Query Error

    Are (Student) and (Billing) fields that are in the sources you are building your query from, or text that you want to concatenate as an indicator? If text, try Payer: IIF(IsNull(BillingLastname), Firstname & " " & Lastname & ", (Student)", BillingFirstname & " " & BillingLastname & ", (Billing)")
  15. adhoustonj

    Solved Missing records using SQL Recordset

    You may be able to build a union query like below to get all records from each sheet. rs.Source = “SELECT * FROM [Jan$] WHERE [F3] = '" & SSearch & "' UNION ALL " _ & “SELECT * FROM [Feb$] WHERE [F3] = '" & SSearch & "' UNION ALL " _ & “SELECT * FROM [Mar$] WHERE [F3] = '" &...
  16. adhoustonj

    Help with adding new record - Access FE, SQL Server BE

    Do your users have the permissions to create/update/delete, etc in the SQL Server database?
  17. adhoustonj

    Microsoft Visual Basic for Applications Compile error: The code in this project must be updated for use on 64-bit systems.

    It sounds like you need to add a 64 bit declaration. Below is an example. 32 bit only: Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long 32 or 64 bit: #If VBA7 And Win64 Then Private Declare PtrSafe Function...
  18. adhoustonj

    Call module

    What is the code for the AuditTrail?
  19. adhoustonj

    What's the best/worst video game of all time?

    Valheim and Darktide are two good ones.
  20. adhoustonj

    Undefined function "FnElapsed" in Expression

    Your database is setup to display frm_JobsList2 on open, and the forms record source contains the fnElapsed function. SELECT tbl_jobsList.[Date and Time], tbl_jobsList.Priority, tbl_jobsList.[From Location], tbl_jobsList.[To Location], tbl_jobsList.[Nurse Notes], tbl_jobsList.[Assign Porter]...
Back
Top Bottom