Search results

  1. J

    Inserting Dates

    1 / 2026 = 4.93583415597236E-04 ;) Dim NewDateFrom as Date NewDateFrom = DateSerial([txtY], 1, 1) Dim strSQL As String strSQL = "UPDATE tblCurentPastYears SET DateFrom = " & Format(NewDateFrom, "\#mm\/dd\/yyyy\#") & _ " WHERE DateFrom is Null;"
  2. J

    SSMA - Issue with Boolean Access Fields

    A side note: If nobody cared about the numeric value of True in Access queries and simply wrote True, queries on SQL Server tables linked via ODBC would also work. Select ... From LinkedServerTable where BitDataField = True This ensures that a Boolean/Bit data type is transmitted instead of a...
  3. J

    MS ACCESS connect to SQL server BE: Authentication Prompt every time I attempt to

    [Slightly off topic] Note: The sa password is saved directly in the application or unlocked with it ... the cracker's heart laughs. ;) Windows authentication is not wanted?
  4. J

    Search for possible declarations

    Thanks for the tip. In such a case, the text before “As” is enough for me, as I only need to find “SomeObject” in this example.
  5. J

    Search for possible declarations

    Thank you very much! I added it in #1. I use WithEvents a lot ... and yet I hadn't thought of it. :) Note: Implements also exists, but I don't have to pay attention to this, as it is directly linked to the upper/lower case of the class. ... Someone might come up with the idea of naming a...
  6. J

    Search for possible declarations

    The code in #1 is code without logic. I just wrote down the variants that came to my mind for defining variables, procedures, etc. I pass this code in a test to the class, which is supposed to read the names of the variables, procedures, etc., from it and verify the result.
  7. J

    Search for possible declarations

    Could you please clarify what you mean? I'm not sure I understand. For better clarification: I am looking for declarations that I might not be aware of or may have overlooked, so I can consider them in the code. I am using the code shown as test code to verify whether my 'name search' works...
  8. J

    Search for possible declarations

    I am currently trying to create an Access add-in that lists all declarations from the VBA code. Background: The idea was born from a discussion (msaccess-vcs-add-in: issue 599) about the behavior of the VBA editor, which adapts each existing declaration to the last written capitalization of the...
  9. J

    Solved Insert records where ID combination not already present (JOIN expression not supported)

    (not tested): SELECT G.GroupID AS GroupID, P.PersonID AS PersonID, S.Type AS Type FROM (tblSource AS S INNER JOIN tblPeople AS P ON S.Person = P.Person) INNER JOIN tblGroups AS G ON S.GroupName = G.GroupName WHERE not exists ( select 1 from tblOwners O where O.GroupID = G.GroupID...
  10. J

    Solved How to Create Tile-Style Buttons on MS Access Forms?

    Try "Quick Styles" for a button with option "Use Theme" = True.
  11. J

    Shortcut Menu 923 not working

    Tested: ID 923 (not FaceId) will only work in Print Preview not in Report View.
  12. J

    Solved Multiple If Statements Problem

    But you should definitely know what they do. ;) If, for example, it is not set, binary automatically applies and then the expression If "a" = "A" or If "abc" like "*A*" will end up in the False block. And as already described above, this setting has an effect on the compare argument of string...
  13. J

    Solved Multiple If Statements Problem

    :) According to the definition (Object Browser), Instr has the default value vbCompareBinary for the Compare parameter. => try this code: Debug.Print InStr(1, "abc", "B", vbBinaryCompare) Expected: 0 because b <> B with vbBinaryCompare Now try this code in a standard module with Option...
  14. J

    Solved Multiple If Statements Problem

    Note: Function InStr([Start], [String1], [String2], [Compare As VbCompareMethod = vbBinaryCompare]) => Compare = vbTextCompare => case insensitiv And for the extra confusion: If the parameter is not set, the setting of the module is used, although vbBinaryCompare should be set as the default...
  15. J

    Solved Multiple If Statements Problem

    Example: Public Function ReturnUMS01(strText As String) As String Dim StartPos As Long Dim TextLen As Long Dim IbanPos As Long Dim SearchStrings() As String IbanPos = InStr(1, strText, "IBAN:") If IbanPos = 0 Then ReturnUMS01 = vbNullString Exit...
  16. J

    Solved Multiple If Statements Problem

    Note: If strText Like "IBAN*" Then ... If strText Like "*IBAN*" Then .. the 2. statement is not possible (except IBAN appears several times in the text) Like "IBAN*" exclude Like "*IBAN*"
  17. J

    Solved VBE Does not recognize Custom Function

    ReturnMandatsnummer is inside "" => for VBE this is a string.
  18. J

    Reg Ex Help please

    Prompt for ChatGPT: https://chatgpt.com/share/67ab94de-11d8-800b-b5ec-181639fbeabf
  19. J

    Reg Ex Help please

    Regular expression: IBAN:\s*([A-Z]{2}[0-9 ]+)\s+(.+?)\s+REF: ChatGPT is very useful for regex ;)
  20. J

    Unable to Create the accde file

    Possibly run /decompile first and then compile again. Perhaps a compile error will then be displayed.
Back
Top Bottom