Search results

  1. MajP

    Access subform - Current event does not fire on first record selected

    That is as expected. If you select the first record which is the current record when the form opens then the on current event is not going to happen again when you select the record. You will need another event or another code to capture selecting the current record.
  2. MajP

    Access subform - Current event does not fire on first record selected

    Why? Why not work with the forms recordset if ado or the clone of the forms recordset? But if it is a pass through query it is a dao recordset. Not sure I understand.
  3. MajP

    Solved Get A Pointer In SubForm To Already Instantiated Class

    To be clear there is no such thing as a static class in VBA. When they say that clsErrorHandler in Northwind is static class that is incorrect and misleading. Personally I think they should change the verbiage to a "Pseudo Static Class". In Northwind 2 it states That is incorrect. It is a...
  4. MajP

    Solved Get A Pointer In SubForm To Already Instantiated Class

    If your variable is public in a standard module then yes you should be able to reference directly If your variable is public in a forms module then think of it as a property of the form. The subform needs to reference it through the form that instantiated it. Something like Dim bb as clsB set...
  5. MajP

    How to Properly Query and Search Multi-Valued Fields in a Form?

    @arnelgp example is probably the hardest thing to do and has a lot going on. This demonstrates using an MVF control with a helper table to build a filter for an MVF field. Here is another example that is does the same thing but has several MVF controls to filter several MVF fields (not my...
  6. MajP

    Solved Treeview nodelevel

    I pull those values to format the tree on load. It was less code then a few dlookups. Public Sub FormatTree() With tvw.TreeView .Font.Size = Nz(Me.FontSize, 11) .Font.Name = Nz(Me.FontName, "Calibri") .Indentation = 150 End With 'In the future align these two names...
  7. MajP

    Solved Treeview nodelevel

    It is an easy assumption that a node has a level property. In .net there is a level property of a node, but not in VBA. If you ask Chat it will tell you there is a level property in a vba treeview, but that is wrong. So you have to roll your own function. According to chat. You can simply...
  8. MajP

    Solved Treeview nodelevel

    Here is a simplified demo
  9. MajP

    Solved Treeview nodelevel

    If this is mirroring ItemGenie then Locations can be nested (a box can be inside a cabinet that can be inside the garage). Items cannot be nested or at least that was how it was designed (cannot do fuel tank inside of lawnmower). 1. Determine if it is a location or an item. If item all items...
  10. MajP

    Solved Treeview nodelevel

    I am completely lost. I am showing an image that is 7 levels deep of "headers". Each level has different formatting based on the header level. The tag tells me what type SB, Bill Item, Comment, or Header The node level tells me what level. For headers I use the level in addition to the type...
  11. MajP

    Solved Treeview nodelevel

    Here is image with more header levels Here is more of the format code Public Sub FormatNodes() Dim nd As Node For Each nd In tvw.Nodes FormatNode nd Next nd End Sub ' Public Sub FormatNode(nd As Node) If nd.Tag = "Header_" Then FormatHeader nd ElseIf nd.Tag = "BillItem_"...
  12. MajP

    Solved Treeview nodelevel

    here is the function to return the colors. I pass in the nodelevel determined from the tvw.getNodeLevel and the node type determined from the tvw.getNodeIdentifier. For headers the node level matters. Public Function GetNodeColor(NodeLevel As Integer, nodekey As String, BillID As Long) As Long...
  13. MajP

    Solved Treeview nodelevel

    That is not true there are multiple levels of headers shown. I can have formatting up to 8 levels of headers. Headers are formatted by level. As I said you determine if it is a header and then you use the level to determine the formatting. The other items SB, Comment, Bill item get a constant...
  14. MajP

    Solved Treeview nodelevel

    In the version I was demoing for @dalski it has a table where you can define the colors for the different levels and/or types of nodes. In his version certain nodes can be at certain levels, but are of a specific type like a comment, or bill item. These always have a specific color. Headers can...
  15. MajP

    Help Please

    I believe the problem is that you need to set your database up to support as a "self-sustaining economy". See example.
  16. MajP

    Relationships for standard & special rates

    That would make sense as long as reference table of standard rates. If not that would create a painful data entry. Assume you have 100 standard rates and 100 companies. TblServiceRates requires 10,000 entries. Every company and every flat rate and special rate. But if you are just making a few...
  17. MajP

    Relationships for standard & special rates

    @LarryE, I think what @Sketchin is saying there is a Company specific list of special rates. So if Pressure Testing has a flat rate of 100 (for most people) Company A has an agreement that they will always be charged 75 Company B may always be charged 80. So you need that table...
  18. MajP

    Relationships for standard & special rates

    I am going to modify the names here to make it more conceptually clear. But you can use your names. In my mind the entity is a Service item which has a description and a flat rate. IMO a standard flat rate for a service is property not the entity. tblServiceStandardRates --ServiceID...
  19. MajP

    Variable defined as Public on a standard module, is not recognized

    After you re-import your modules. In your code that references these variables what happens when you type "modVariabiliGlobali. " Does intellisense show all the variables you would expect? I exported this module. Deleted it and re-imported it. It compiled with no issue. My guess you have a...
  20. MajP

    How to Properly Query and Search Multi-Valued Fields in a Form?

    You can use a MVF in several ways You can use an MVF control to filter a standard field or an MVF field You can use a multi select listbox to filter a standard field or an MVF field. Since you want to have lots of other controls in you search form I think it would be easier to use a standard...
Back
Top Bottom