Recent content by Josef P.

  1. J

    Code library database

    At first, I also used a collection of code libraries (At that time, I created them with Access Developer Extensions as DLL). Due to the effort involved in maintaining different versions, I switched to a collection of codemodules that I could import into and update in the respective application...
  2. J

    How to register library/reference from vba code?

    The type library is only for types (interface). The .net COM DLL types do not need to be added to the registry if you load them with mscoree.CorRuntimeHost & co, for example. Steps: 1. Reference to tlb => VBE can check the interface 2. Load com dll class instance via mscoree.CorRuntimeHost /...
  3. J

    How to register library/reference from vba code?

    Note: late/early binding If you create a tlb file and link it via the file path, you can use early binding without having to register the dll. This is useful for development.
  4. J

    Solved StringFormatSQL from Northwind

    That should also be the result of the suggestion in post #3 (only ' instead of "). But let's start in reverse order: What should the result look like? Is that the target: UPDATE tblItems SET ITPath = '1 > 3', Item = '(New)', InUse = True WHERE flocID = 7 and DocNo = 1; If I interpret your...
  5. J

    How do I create an Access/Excel add-in AI powered, to recommend/optimize vba code?

    You would have to test what ChatGPT & Co suggest when you ask them for an Access add-in that optimizes VBA code. Would the answer be that a VBE add-in might be more useful? ;)
  6. J

    field variables in sql string

    A few tips for troubleshooting/prevention: * Use an extra variable for the concatenated SQL text, then you can output the content more easily. Public Sub inToDisc(dFamily As String, sFamily As String, nAccno As Double, sStr As String) dim InsertSql as String InsertSql = "INSERT INTO...
  7. J

    How to register library/reference from vba code?

    RegAsm /regfile:filename.reg => reg file for HKLM => change HKLM to HKCU.
  8. J

    How to register library/reference from vba code?

    Am I understanding you correctly: you want to perform the COM registration of the library? Like regsvr32 "Y:\our\COM\File.dll" You can read the guid value: vbe.ActiveVBProject.References(index of reference).Guid
  9. J

    Query optimization: Why does Access use temporary index instead of index or rushmore for a JOIN query with SUM?

    Perhaps a temporary index is “faster” than a seek on an existing index followed by a lookup for one field ("Amount"). Just as an idea: please try testing with an index (2 fields) on CompanyID and Amount.
  10. J

    How to make a large project?

    https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c => 1000 modules (including forms and reports that have the HasModule property set to True)
  11. J

    Form Design to Allow Multiple Selections (Add your Ideas)

    A fixed join with the MVF table is too inflexible for me. I retrieve the array from the MVF and use it to create the filter expression. I can then use this directly for T-SQL statements via ADODB. I use the MVF only for visual effect. A typical example of how I use it: filtering status values.
  12. J

    Form Design to Allow Multiple Selections (Add your Ideas)

    That would be my non-fake version: ;)
  13. J

    Filter property or sql Where? OrderBy property or sql Order by?

    Let's assume that only the data in the open recordset is filtered: Why are new records displayed when the filter property is changed, such as those entered by another user after the form was opened? I suspect that this assumption is based on the same premise as the frequently repeated...
  14. J

    Filter property or sql Where? OrderBy property or sql Order by?

    Disconnected DAO recordset? ;) When does Form.RecordSource (today, not ADP) use an ADODB recordset? Let's stick to the standard of bound forms in this discussion. /edit: jet showplan Form.Filter and the changes to Form.RecordSource generate the same showplan. Why should all data records still...
  15. J

    Filter property or sql Where? OrderBy property or sql Order by?

    Open a form (make sure it is of type Snapshot) and change a value in the table. If you now apply a filter, you should see the old value, right? .. But that's not the case. You see the changed value. Another example: You have a table with several million records. If you open the form with the...
Back
Top Bottom