Recent content by bodders24

  1. B

    VBA class modules & factory design

    @Albert @MajP Thanks for your extensive comments on my original post. I just caught up with them today. I will post a more detailed reply tomorrow. I have one specific question - pls advise if I should start a new post for it: I have an interface class module IHoliday and an implementation...
  2. B

    VBA class modules & factory design

    Thanks for all the responses, and the helpful suggestions. My main aim from this is to get as much code as possible for the class modules built by the Class Generator accdb using just the SQL Server table. The secondary benefit is that I can add additional procs for saving to and loading from...
  3. B

    VBA class modules & factory design

    I have developed a 2-tier application for my own use for budgeting. It was originally an Access front-end and an Access back-end, and I am currently upgrading the back-end to MS SQL Server. As part of this upgrade I want to make as much use as possible of VBA class modules. To this end, I have...
  4. B

    Access subform - Current event does not fire on first record selected

    Thanks for your replies. I have found one way round it (sort of). If you select the first x records starting with record x the Current event fires. If you select the first x records starting with the first record it does not fire - but only immediately after the form has been opened. It works on...
  5. B

    Access subform - Current event does not fire on first record selected

    I have an annoying little problem with the following setup. I have a SQL Server back-end database with a Microsoft Access (2019) front-end. One of the Access forms contains a subform which has as its recordsource a pass-through query reading data from the SQL Server back-end. What I want to be...
  6. B

    VBA to read foreign keys in table

    Thanks for your responses. The use of the MSysRelationships table solved the problem.
  7. B

    VBA to read foreign keys in table

    David Thanks for your reply. I had already done this: For Each rln In gdbs.Relations blnSelect = True If InStr(1, rln.Table, "Hol") > 0 Then blnSelect = False End If If Mid(rln.Table, 2, 3) = "Sys" Then blnSelect = False End If If (blnSelect = True) And...
  8. B

    VBA to read foreign keys in table

    I have written some VBA to create a basic data model in Excel from an Access database. It’s nearly there, but I have found an issue with finding the Foreign keys in tables. Here is the relationship: And here are the indexes in table tblSubHeading: When I use the Relation object the VBA...
  9. B

    VBA to add Totals to subform

    CJ - Finally the penny has dropped & I see what you meant. It's all working now - many thanks for your patience & help. Bodders
  10. B

    VBA to add Totals to subform

    As requested here is all the code used to rebuild the table and subform. I *think* the problem is somewhere in the subform properties. Also thanks for all the help and advice so far - it's been very useful The complete code exceeds the character limit for posting here, so here is just the proc...
  11. B

    VBA to add Totals to subform

    How did you set the total cells - manually ?
  12. B

    VBA to add Totals to subform

    This is what I see with the query as the subform SourceObject - a Total row but no totals:
  13. B

    VBA to add Totals to subform

    Thanks for the responses. Having tried everything suggested above, here is the current situation. The query which is the SourceObject for the datasheet subform produces a totals row and individual total rows exactly as it should, using AggregateType = 0. The problem is the subform. I can add...
  14. B

    VBA to add Totals to subform

    Warnings are definitely on
  15. B

    VBA to add Totals to subform

    Changing qdf.Fields(5).Properties("AggregateType") = 0 to qdf.Fields(5).Properties("AggregateType") = acAggregateSum actually produces the wrong answer in the query. It gives the average.
Back
Top Bottom