Search results

  1. 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)
  2. 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.
  3. J

    Form Design to Allow Multiple Selections (Add your Ideas)

    That would be my non-fake version: ;)
  4. 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...
  5. 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...
  6. 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...
  7. J

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

    Only the records from the table that match the Where parameter expression are retrieved. This can be seen in the Jet Showplan or for SQL Server in execution plan. Of course, it may be that the Jet Showplan displays something different than what happens within Jet/ACE. ;) But with SQL Server...
  8. J

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

    If you look at the Jet showplan (or execution plan from SQL Server), you will see that using Form.Filter generates the same plan as modifying the SQL statement for the form's data source. But: It's not possible to use Form.Filter and Form.OrderBy so that only one data query is executed. With the...
  9. J

    If ANY libraries are missing from the references, the date() function won't work.

    As Philipp already described, in the order of the reference list - with the exception of the VBA library, which cannot be removed/moved. That's interesting. Now() also works and is in the same module as Date(). Thanks for pointing that out. Date, Time, Format or Mid do not work once a reference...
  10. J

    If ANY libraries are missing from the references, the date() function won't work.

    If only Date() is used, the VBA library is searched last. The search for a global function proceeds as follows: First, the VB project of the application Then the references of the VB project (excluding VBA Lib) Finally: VBA library Quick fix: Use VBA.Date() instead of just Date(). This...
  11. J

    Solved IsNull not working in query

    Null or not null, that is the question. ;) SELECT [Regi No],[DD_ReceiptNo],[WO Date] FROM [Master Data] WHERE [DD_ReceiptNo] IS NULL SELECT [Regi No],[DD_ReceiptNo],[WO Date] FROM [Master Data] WHERE [DD_ReceiptNo] IS NOT NULL If varchar: SELECT [Regi No],[DD_ReceiptNo],[WO Date] FROM [Master...
  12. J

    syntax error with null values

    By “VBA SQL construction” do you mean a string composition? Then the Variant variable is requested as a string and returns an empty string. The same with Debug.Print: what you see is a string. To be precise, the unassigned variant variable is empty. And Empty generates the behavior described...
  13. J

    syntax error with null values

    ... if you compare the variable with a string. If you compare it with a number, it assumes 0. Dim X As Variant Debug.Print X = vbNullString Debug.Print X = 0 Debug.Print X = vbNullString And X = 0
  14. J

    Is there a way of deleting all code lines beginning with debug.print across all modules using VBA?

    Quick side note: Compiler constants (Conditional compilation arguments) can also be helpful, allowing you to enable debug output when needed. Example: Set either project-wide or in the specific code module: VB Project: Only in specific code module: #Const DEVMODE = 1 #If DEVMODE Then...
  15. J

    Solved Ugly new Access bug

    Exactly! As I wrote, I would have expected the same thing when switching to the design view via the ribbon as when switching via the VBE. I would consider it acceptable that the form does not close "normally" because the closing process is interrupted by the error.
  16. J

    Solved Ugly new Access bug

    A picture is worth a thousand words ... :) You might expect similar behavior when switching to design view (from ribbon).
  17. J

    Solved Ugly new Access bug

    ... except for the workaround via the VBA editor (Error msgbox -> Debug -> VBE: design mode).
  18. J

    Solved Ugly new Access bug

    I wouldn't call it a bug in the sense of a coding error. But if we define a bug as undesired behavior, then I agree. At the very least, when switching to design view, I would expect the form not to remain stuck in form view if an unhandled runtime error occurs. I would expect a message similar...
  19. J

    Solved Read Type Information (Classes & Methods) from COM DLL

    I am currently using a COM-DLL that I created myself, because reading the names and methods from the TypeLib via VBA is too cumbersome for me. My .NET COM DLL...
  20. J

    Solved Ugly new Access bug

    Simple test: Private Sub Form_Unload(Cancel As Integer) Dim X as Long X = 1 / 0 End Sub The form can only be closed if you click on Debug and manually ensure that 1/0 is not run through (e.g. move “yellow arrow” to End Sub). The question is: What do you expect when you click on End...
Back
Top Bottom