Search results

  1. J

    Enable/Disable shift open key IF

    I would say: because it is not possible to implement this in one pass according to your example code. AllowBypassKey requires a restart of the application to take effect. => Change AllowBypassKey from the outside or rebuild the start code so that the unwanted start procedures are not started...
  2. J

    Enable/Disable shift open key IF

    If you want to start the application with shift key, you must remove AllowByPassKey before starting the application. Another thought: Maybe you just want to prevent the usual application start. Then it would be sufficient not to execute it as soon as file unlock_shift.txt is available.
  3. J

    disable shift open key

    Thinking briefly in a different direction: Does it necessarily have to go through the undo_shift.txt bypass? Wouldn't it be easier to remove the shift lock from the outside and set it again later?
  4. J

    Should banker's rounding work on calculated figures?

    Note: Currency https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/currency-data-type => Currency = Decimal(19, 4) / Numeric(19,4) + Info from #14 ;) or https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/data-type-summary
  5. J

    Solved Create a function to save my Add_IN file.

    Note: Copy file to %appdata%\Microsoft\Add-Ins\... I usually use a VB-Script to quickly install/update an add-in in the add-in folder. Example: https://github.com/AccessCodeLib/FilterFormWizard/blob/main/access-add-in/Install.vbs Because I like the variant of msaccess-vcs-addin to install the...
  6. J

    Solved Calling a procedure from an add-in

    To list the code modules of the application, you must find the right VB project. Inside add-in: a) Check via file path private m_CurrentVbProject as VBIDE.VBProject Private Property Get CurrentVbProject() As VBIDE.VBProject Dim Proj As VBIDE.VBProject Dim CurrentDbName As String If...
  7. J

    Solved Calling a procedure from an add-in

    The call via Application.Run ...\EssaiBarreOutils8.InsererEnTeteTitreModule only works if the file has the extension accda. It is much easier if the VBA project is already loaded: Application.Run "InsererEnTeteTitreModule" I think this is the wrong direction. If you use an add-in file directly...
  8. J

    Solved Function that deactivates my toolbar

    Just as an idea for a procedure for Access/VBA friends: You could create an Access add-in first and if you feel in the mood later, you can continue to use this code in twinBasic with probably only a few (maybe even no) modifications. Disadvantage of an Access add-in: you have to call it up once...
  9. J

    Solved Function that deactivates my toolbar

    I assume that you like programming, otherwise you would use Mz-Tools to insert a module header and not build something yourself. :) Perhaps a few examples of Access add-ins that process codemodules will help. msaccess-vcs: https://github.com/joyfullservice/msaccess-vcs-addin ACLib Import...
  10. J

    Solved Function that deactivates my toolbar

    First of all: if you want to create a VBE add-in, I would recommend a COM add-in for this. This can then be loaded directly when the VBA editor is opened. To create a COM add-in, you could use twinBasic, for example. Of course you can also create this with .net (VB.net, or C#). You can create...
  11. J

    Solved Function that deactivates my toolbar

    You could call the code for adding the modules from an add-in. Then there are 2 different VBA projects.
  12. J

    Solved Function that deactivates my toolbar

    As soon as the mcolBarEvents collection disappears from the memory, the system no longer listens to the button click. Module: InsertionBarreOutils ... ' Dans un module standard (par exemple, Module1) Public mcolBarEvents As Collection...
  13. J

    Solved How to search with an apostrophe without throwing up run-time error '3075'

    short description as code: Dim FilmTitleToFilter as String Dim CriteriaString as String FilmTitleToFilter = "Marvel's Avengers" ' 1. wrong code: CriteriaString = "[Film Title] = '" & FilmTitleToFilter & "'" Debug.Print CriteriaString '=> [Film Title] = 'Marvel's Avengers' => ' is the string...
  14. J

    Solved How to search with an apostrophe without throwing up run-time error '3075'

    .. and also try this filter value: abc" or "a" ="a ;)
  15. J

    Solved Control Events Not Firing After User Action

    There is a quick way to do this: Select the entire code in the form class, cut and paste it again. Steps: Set Focus to class module -> Ctrl+A -> Ctrl+X -> Ctrl+V The "connection" between event handler and event properties (OnClick,...) are then set again.
  16. J

    Solved How to search with an apostrophe without throwing up run-time error '3075'

    DoCmd.OpenForm "frm_AllItems5", , , "[Film Title] = " & "'" & Replace([FilmTitle], "'", "''") & "'" => Important against sql injection To make this easier to read, I recommend creating an extra function for this. DoCmd.OpenForm "frm_AllItems5", , , "[Film Title] = " &...
  17. J

    Solved Ecount and concatenation

    @MajP: thanks! Note to code: It is a customized and minimal refactored version of Allen Browne's ECount function.
  18. J

    Solved Ecount and concatenation

    In addition to MajP: ECount works with a Recordset. A Recordset cannot access form elements. If you want to keep the form reference in the query, you can alternatively adapt the ECount function. /edit: adapt the ECount function with a QueryDef, as shown in #10 Example file:
  19. J

    Solved Ecount and concatenation

    Could it be that you are trying to write the SQL text in the Access query in the same way as in VBA? I would use a query without filtering by the form control and pass the filter expression to DCount/ECount. If DCount("EVENT", "qryAuditLogWithoutFilterByForm", "REFERENCE = '" &...
  20. J

    Select from which date as a variable vba access

    [OT] Note (date format / regional settings): / is the date separator (see Format - User-defined date/time formats) => Format(#14/01/2025#, "mm/dd/yyyy") returns 01.14.2025 with reginal setting de-at. =>use Format(#14/01/2025#, "mm\/dd\/yyyy") I prefer: Format(#14/01/2025#, "yyyy-mm-dd") or...
Back
Top Bottom