Search results

  1. J

    Solved Catch error from Access-In procedure that was started with Appliction.Run

    Does anyone know a way to read out the error text if an add-in procedure was started via Application.Run and this procedure triggers an error with Err.Raise? Warning: long introduction for a short question, but I think it's necessary. Starting situation: The msaccess-vcs-addin can be used to...
  2. J

    Insert Records with VBA and get new autonum value - different variants and possible problems

    Inspired by https://www.access-programmers.co.uk/forums/threads/how-to-avoid-the-domain-functions-in-ms-access.330010/ I am trying to compare insert variants in VBA in this thread. First of all: I only discuss the variants that can be used with Jet/ACE (e.g. executing procedures in an active...
  3. J

    Tools for frontend development

    Reading the thread "How to test program before releasing new version?" it occurred to me that it would be interesting to find the "ideal development environment" for Access. What does your Access frontend development environment look like? (Backend development I would like to leave out in this...
  4. J

    Northwind2 - Unit Tests

    At this point I thank the Northwind2 creators, I can use the file well for testing my unit test application, since with it the own "operation blindness" is minimized somewhat. Now I will show how such a test can run. Maybe I'll get some of you to think about securing your own code with unit...
  5. J

    General error handling - but correctly

    Since I see it again and again that unrecoverable errors in procedures are displayed to the user with a MsgBox but then the code continues as if nothing had happened, I put the problem up for discussion in this thread. For example, this error handling is incorrect: Private Sub MainProc()...
  6. J

    Access-Add-In: Import Wizard

    Just a quick note, in case someone wants to use something like this. ;) Until now you could only use the ACLib Import Wizard with a local copy of AccessCodeLib repository. In the last days I extended the Access add-in so that you can import codemodules directly from a GitHub repository. This...
  7. J

    Solved VBA Code Documentation Tools

    I am in the process of revising my reusable code modules. This also includes the documentation of the interfaces. Currently I use code comments that can be evaluated with doxygen. Unfortunately these are not very readable in the code. Doxygen URL: https://www.doxygen.nl/ Example...
  8. J

    Solved Code coverage of unit tests in VBA

    I'm working on AccUnit (unit test framework) again and would like to implement some kind of code coverage check. Does anyone have an idea how to check something like this without having to make (big) changes in the source code? Simplified example: Public Function ProcedureToTest(ByVal X As...
  9. J

    Promotion of short procedures: Splitting a string into lines

    Since I keep seeing single long functions, I would like to show the advantages of splitting them into several smaller procedures with an example. Objective: Splitting a Long String into Multiple Lines (see...
  10. J

    Annoying automatic filling of link master/child fields at runtime

    Because I overlooked the automatism once again and wondered about the displayed data: Does anyone know a way to prevent the LinkMasterFields and LinkChildFields subform properties from auto-populating when changing the subform data source at runtime? Access sets this property automatically when...
  11. J

    Error handling in VBA: how to do it wrong

    Addition to: https://www.access-programmers.co.uk/forums/threads/menus-on-a-form.326893/post-1868023 I'm starting a new thread since this doesn't fit the actual topic of the linked thread. However, since I always see a similar structure in error handling, I wanted to show an example of how not...
  12. J

    CodeProject.Allforms("FormName").Properties raise an error

    Hi! In an add-in (https://github.com/AccessCodeLib/better-access-charts/tree/main/access-add-in ... BetterAccessCharts.accda ) I use CodeProject.AllForms to get the AccessObject of a form in the add-in. The AccessObject is captured correctly. But when I try to read the properties from it, I get...
Top Bottom