Search results

  1. J

    Solved Why setting the backstyle in vba fails?

    Note: To ensure that your code can also be used as a subform without much effort, you could pass the control reference to the ShowCombo procedure instead of the form name and control name. Public Function ShowCombo(frmName As String, obj As String) Forms(frmName).Form.Controls(obj).SetFocus...
  2. J

    Open another form to display record

    I think MajP has already described the problem in #2. Inner joins vs left/right join SELECT ... FROM ( tblAppartment INNER JOIN qryApartmentSummary ON tblAppartment.AppID = qryApartmentSummary.AppID) INNER JOIN (tblTrashCan INNER JOIN ((tblSalution...
  3. J

    Open another form to display record

    What does this query (SQL) look like? Is there a Where statement? Does it possibly contain something like Surname like '*'?
  4. J

    Dynamic/reusable forms

    Quote from post #1: I don't know why some posts talk about advertising for the marketing of a framework. From the quote above, I understand that you want to share ideas about the design. Am I wrong about this? As already written in #36, I also use forms from time to time that provide (show)...
  5. J

    Solved DateAdd Function acting weird.

    This could depend on the list separator ... ; vs , Try in design view: dateadd("m";1;Fieldname)
  6. J

    Solved Invalid Procedure Call Or Argument On Everything!

    Perhaps a reference is broken. Can you compile the VBA project? Or: Create a backup and try decompile.
  7. J

    Dynamic/reusable forms

    I also use generic forms when necessary (if appropriate), but not always. I usually prefer to simplify form creation with add-ins. I don't see customizing the layout of the controls in a form as a major development effort. I tend to use generic forms for certain tasks in which the customer...
  8. J

    Indenting and Spacing Revisited.

    If you are thinking about the spacing, this could also be a sign that the procedures have too much different content.
  9. J

    What prevents Access from using the full power of the PC?

    DoEvents is used in msaccess-vcs to display progress indicators that intentionally generate short interruptions during code execution. It should also be noted that not only pure VBA is running. Methods from the Access objects are also used. I could well imagine that these could use several...
  10. J

    How to read the Funct/Sub name from Vba code?

    Mz-Tools only requires the name at design time, which can be handled using vbComponent and CodeModule. The magic starts with vbWatchdog to provide the name at runtime. ;)
  11. J

    How to read the Funct/Sub name from Vba code?

    In principle, it is possible to read out the function name, as it can be read out by vbWatchdog. However, you have to be a "VBA magician" to do this ;) I only know that it is not possible with VBA.
  12. J

    Solved module variables

    Note: EditCombo Me, "cboUserName", "UserName", "qryNames", "popNameInfo" 10 If DCount(strItem, strDomain, strItem & "='" & frm(strCombo).Text & "'") = 0 Then 'strItem & "='" & frm(strCombo).Text & "'" 20 strOpenArgs = frm(strCombo).Text 30 End If Hopefully nobody has...
  13. J

    Solved Equation: If it isn't an error and it isn't Null yet it has no value, what is it?

    Perhaps there is no data record in the subform. The locals window can help to find the problem.
  14. J

    How to distribute an Access app?

    Error handling should be mandatory in the procedure that is called first. In the other procedures, error handling can be useful in order to obtain good information about the cause of the error. But please do not simply call a MsgBox in the error handling in every procedure, as this will result...
  15. J

    Need some advice on a simple Class

    ... or implement via dependency injection. I find this more elegant, as you can program it against an interface. (Particularly when you keep in mind that Access.Label is an interface and not a class ;))
  16. J

    Need some advice on a simple Class

    In my opinion, the number of classes doesn't say much about overkill. A few more classes can certainly achieve a better separation of responsibilities and if a few generally usable classes are then created, I even see this as an advantage. Attached is my suggestion for the task in #1
  17. J

    Is this a normal behavior in Access?

    Unfortunately, this is the “comfort functionality” of VBA/VB6 that I would prefer to turn off. :)
  18. J

    Is this a normal behavior in Access?

    is equal to Function test() as Variant In principle, functions behave in the same way as variables. Dim X as String Dim Y ' ... equals: Dim Y as Variant
  19. J

    Is this a normal behavior in Access?

    Because the compiler assumes that the parameter is not the parameter of the function but the parameter of the default property of the object returned by the function. Dim frm as Form set frm = Forms("...") dim ctl as Variant ' ... or Control set ctl = frm("ControlName") ' <--- this is not a...
  20. J

    Is this a normal behavior in Access?

    Thanks Philipp, that's exactly the explanation why the compiler can't report an error. I hadn't thought about default properties. And since Variant/Object performs a late binding on object return, the compiler cannot know whether the default property of the “expected” object supports the parameter.
Back
Top Bottom