Search results

  1. G

    Unexpected Form_Undo event

    I have used SetWarnings False in one place in my app but nothing to do with this form. I commented out my Form_Undo sub, and checked that the Event reference was gone in form design. Access still does an Undo if I try to close the form with the 'X'. It doesn't undo when I try to save with a...
  2. G

    Unexpected Form_Undo event

    I just looked in Options, Client Settings Record Changes, Document Deletions, Action queries. all ticked. Is there something else to check ?
  3. G

    Unexpected Form_Undo event

    Scenario: I have validation in BeforeUpdate which cancels the save. If I enter invalid data on a form, and try to save the record with DoCmd.RunCommand acCmdSaveRecord, my error trap fires and I pop up a message. In testing, I'm finding that when I try to close the form with the 'X', I get my...
  4. G

    Compiled General Journal in a table...

    Yeah but ... I wasn't talking about accounting in the line you quoted ... I know the double entry is simple and I think the OP does as well. S/he wanted an automatically generated 'double entry' and it's up to the OP to code it, and make it robust so the ledgers can't get out of balance...
  5. G

    Compiled General Journal in a table...

    I think having all 'line' transactions in one table is the right way to do it. All linked to a 'documents' table. I would not have separate columns for debit and credit but a single signed column for the transaction value. I chose a schema where I write (number of item lines) + 2 to the...
  6. G

    Locking a Record with Warning

    I think I can solve this by putting the 'balance' validation in the form Unload event and cancelling it if the records don't net down to zero
  7. G

    Locking a Record with Warning

    I've implemented the method described in post #11 but I must be missing some detail as it's flawed in my application. I have a main form with sub form for transactions, 1-many. Main form record has fields thUserInUse and thDtInUse. Validation is in BeforeUpdate of the main form. The user...
  8. G

    Get SUM right after data change

    The check/uncheck checkbox is a three-state indicator, and a two-state click. It serves two functions. As an indicator: Assigning false clears the checkbox, a clean empty box Assigning true shows a tick in the box Assigning null shows a small black square (indicating partial selection) As a...
  9. G

    Get SUM right after data change

    My query is supposed to be returning only the number of *checked* records in the linked table, tblSelectLines, but it's returning the *total* number of records. I think I may need to re-visit my original method of using the datasheet footer totals, which are at least correct, and find some...
  10. G

    Get SUM right after data change

    To be honest getting the total of tagged lines in a query wasn't my preferred method. It seems like such a simple thing to do but I've been on this for hours. I preferred to let Access do the summing in the sub form datasheet footer but it's not working. In this screen shot, I have two text...
  11. G

    Get SUM right after data change

    SELECT tblTransLines.tlTransHeaderFK, Count(tblTransLines.TransLineID) AS CountOfTransLineID, Count(tblSelectLines.slSelected) AS CountOfslSelected FROM tblTransLines INNER JOIN tblSelectLines ON tblTransLines.TransLineID = tblSelectLines.SelectLinesID GROUP BY tblTransLines.tlTransHeaderFK...
  12. G

    Get SUM right after data change

    Hang on something's not right in the SQL ... just checking it out
  13. G

    Get SUM right after data change

    When I untick one record, I want to assign 'Null' to the Tags checkbox. I can do that, but what I can't do is get the sum of checked records in time. Sub CountTransLines runs a SQL query but it returns the 'old' total of checked records. Private Sub slSelected_Click() Dim lngNumRecs As Long...
  14. G

    Get SUM right after data change

    I want to replicate the Windows behavior where I have a datasheet of records with a checkbox against each one. As well as the selection checkboxes I have another one which sets or unsets all or no records (working correctly) I want to do the reverse setting of the summary checkbox. So let's...
  15. G

    Query and Sub Query Help Please

    Thanks, Doc_Man. Yes, I've been working on this and I'm pretty sure I can get the result I want by creating two 'base' queries and a third 'joining' query. So it is certainly possible to get the SELECT that I need. Thank you. The updating is a different issue I'll have to deal with that...
  16. G

    Query and Sub Query Help Please

    Well spotted, Yev18. But it is as it is meant to be. I don't know if this counts as a 'novel' solution or a 'wacky' one but it works for my db schema. User adds an order to the system. A header record is created in tblTransHeaders. n line records are created in tblTransLines. A line record...
  17. G

    Query and Sub Query Help Please

    Thanks Colin. I tried the DistinctRow and the query returns the same result set. The inconsistent updates - I had to look that up - I think it's a form setting? At the moment I haven't got this query in my form, I'm trying to get the right results just by popping a parameter in (HeaderID)...
  18. G

    Query and Sub Query Help Please

    Having slept on it I think dbguy is right in saying it’s going to be non-updateable. The sub query that returns a sum will prevent any field from being updateable. Not sure how I will deal with it but let’s say I drop that requirement. What I want to do sounds straightforward: For each...
  19. G

    Query and Sub Query Help Please

    Query and Sub Query Help Please Trying to get an updateable query working which draws totals from a sub query. I can't get the totals from qrysub_QtyDelivered into the main query Here's a screenshot of the sub query result set and the main query result with the missing result SELECT...
  20. G

    Double-Click Event of Datasheet Line and WithEvents

    Thanks all, I think on balance I will leave the duplicated code in rather than tinker with it. I just put a note in the code to say, don't forget to update the sister code in the other module (you guessed I kept forgetting) MajP's code is bookmarked for future reference.
Back
Top Bottom