Search results

  1. D

    Return to current nested subform record after recalc

    Here is the form in design view. How is this not a main form, with a subform and a nested subform within that? There are clearly 3 forms. What am I missing here?
  2. D

    Return to current nested subform record after recalc

    I have a main form, frmItemDetail. This form has a subform frmStageSub in datasheetview. Nested within this form is another subform called frmCategorySub in Continuous Forms view. See attached pic. On the main form, there are 6 calculated controls, Dsums, Dlookups etc. frmStageSub and...
  3. D

    DSUM Syntax with multiple Criteria

    Sorry for the confusion. I understand that query criteria can't access vba variables. I thought that since this Dsum was in a report control it might be different, but I think it isn't. Regardless, I have a much better grasp of domain aggregate syntax now. Thanks for the help.
  4. D

    DSUM Syntax with multiple Criteria

    Thanks for the input everyone. I think I have to agree. This is how it worked originally, but I thought it might be advantageous/simpler to go the variable route. But now it's looking like I'm making things much more complicated to make them "simpler". Just for my own understanding, does it...
  5. D

    DSUM Syntax with multiple Criteria

    Thanks, Ridders. My rationale for using global variables was that I planned on closing frmReportGenerator, instead of simply making it invisible, when the report is opened and I needed somewhere to store the dates selected on that form. Is that a bad idea? Yes, rptStartDate and rptEndDate...
  6. D

    DSUM Syntax with multiple Criteria

    Would any of you mind helping with one other thing with this exact same calculated control? I'm trying to make this whole thing shorter by using variables. My question is only about the last part: [LaborDate] Between #" & [Forms]![frmReportGenerator]![txtStartDate] & "# And #" &...
  7. D

    DSUM Syntax with multiple Criteria

    Ridders, Galaxiom and Pat, thanks for taking the time to shed light on this. It has been VERY helpful. This was actually a mind blower. I had been thinking of it like this: " & [Forms]![frmReportGenerator]![txtStartDate] & " This actually makes sense now. I generally followed this, but...
  8. D

    DSUM Syntax with multiple Criteria

    Oh man. That worked. I'm stepping away from the ledge now.... Incredible. A few thoughts: 1. I'm going to go broke buying all of you guys beer. 2. It's amazing how much incorrect info is out there about syntax. Correct me if I'm wrong, but even this "Art of Writing Criteria" page has...
  9. D

    DSUM Syntax with multiple Criteria

    OK, that looks like what I need. Plugging it in now...hold your breath...
  10. D

    DSUM Syntax with multiple Criteria

    The trick the syntax for using "between". I've seen a million contradictory examples and none are working
  11. D

    DSUM Syntax with multiple Criteria

    I want to calculate a total in a report. It seems to me that a DSUM field would work perfectly, but I absolutely cannot figure out the syntax. I have a table called tblLabor with the following fields ProjectID, LaborID, LaborDate, Total This is working. It gives me the labor total for a...
  12. D

    Automatically create records in subform and nested subform

    Thanks JHB, I will post something later. Do you have any idea why this isn't a problem with the sample database that you posted?
  13. D

    Automatically create records in subform and nested subform

    The new records are added as part of the After Update event when the cboItemType combo box is changed. I forced it to save the record and it works, but I didn't think I should have to do that because your example works without saving the record.
  14. D

    Automatically create records in subform and nested subform

    I've run into an interesting problem. When I adapt this method to my current project I get an error when doing the append queries on a totally new record on the main form. It works fine if I append to an Item that previously existed. It says it failed to append the records due to primary key...
  15. D

    Automatically create records in subform and nested subform

    This should keep you happy for a while Thanks again
  16. D

    Automatically create records in subform and nested subform

    JHB, Amazing. That did it. I'm going to dig into your sample and figure out how you did that. This is great. THANK YOU!! Where should I send the beer?
  17. D

    Automatically create records in subform and nested subform

    Uncle Gizmo, Thanks for taking the time to spell that out. I have not used For Next loops in VBA, but I have used For Each loops in javascript and they appear to be the same thing essentially. Great idea. I have very limited experience with recordsets. I'm playing with the idea a bit now...
  18. D

    Automatically create records in subform and nested subform

    Wow. JHB, That's really something. Sooo much simpler! It never occurred to me to make separate tables and append the records this way. Great idea. I am trying to apply this to my project, but I'm having difficulty with one particular issue. ItemID is the top level ID for the main form...
  19. D

    Automatically create records in subform and nested subform

    Even if my code above is not the ideal method, it does work. Just for my own understanding, would anyone be willing to give me some ideas for how I could compact/improve what I already have? It seems that there is so much repetition in there, but I'm not sure how best to avoid that. Thanks
  20. D

    Automatically create records in subform and nested subform

    Mark_, Good question and good point. The code that adds the records will only execute if there are zero records in the subforms. If they try to change to value of the combo box and records exist in the subforms, they get a MsgBox explaining that they can't change it unless they manually remove...
Back
Top Bottom