Search results

  1. MajP

    VBA class modules & factory design

    Interesting. I wonder when that was fixed. That used to be a problem. Glad to see it is no longer.
  2. MajP

    VBA class modules & factory design

    I would argue that if you are lazy (and have MZTools) then creating accessors (let, get, set) for all class variables save a lot of coding time. With MZTools it takes a second to create the accessors from a class variable, but now coding is much faster especially with larger classes. I do not...
  3. MajP

    Multiple member List

    So let me see if I understand this. You interpret the OP to be at some kind of Mormon compound where members are married to multiple people? I did not see that coming. Even if so why would you have a Partner table separate from the members table? Is your assumption Partners are not members...
  4. MajP

    Advice please on good practice

    A lot of this is subjective and deals with readability, maintainability, ease of use, and ability to debug. You can go to either extreme. I tend to have a lot of modules if they are a related group of methods (printUtilities, applicationUtilities, FormUtilities, ImageUtilities etc...) But I do...
  5. MajP

    Multiple member List

    Self Referencing Approach If you wanted to do a self referencing table then keep the yellow fields You create your query by dropping the member table twice. Again alias it for ease of use 2. Create Query. This is a little more involved so that you do not get 1,2 and 2,1 for the same...
  6. MajP

    Multiple member List

    I would go with Ken's approach it is far easier. You could do what duane suggests and make a self referencing table but that is confusing unless you have done this before. Both work. Here is a version of Ken's to show how to do it. Also I modified it to handle an inclusive church where you can...
  7. MajP

    Trying to wrap my brain around table normalization in a 1:many relationship

    OK, I thought about what you are probably trying to do and I get the problem. This is not a table or normalization issue, but likely a GUI issue. This is not the traditional Parent Child model where you create the parents and then create new child records. This is an assignment problem, where...
  8. MajP

    VBA class modules & factory design

    Why would you expect to see a private procedure available outside of the class? Maybe I do not understand, but that is as expected.
  9. MajP

    Trying to wrap my brain around table normalization in a 1:many relationship

    That is a little confusing because you are leaning towards B, but you think the solution is indexes in A. If you simply need to make a HR assignment without maintaining history then B is the simpler and more correct solution. Unless there is more to it in the real problem. If you go with B you...
  10. MajP

    Solved Multi-Select List Box, Distinct Values

    Sure I am all for creating efficient code, but when we need to start putting reality to things. It is not 1980. 1000 iterations is a fraction of a second. :rolleyes: When start worrying about fractions of seconds as being "Grim" that is a kind of silly. Moreover, I would think it is highly...
  11. MajP

    Solved Multi-Select List Box, Distinct Values

    @MattBaldry, Trying to figure out why that did not work and I must have copied something wrong. Sorry about that I copied this and did not enclose the If For i = 0 To UBound(aItems) If Trim(aItems(i)) = Trim(newItem) Then found = True Exit For Next i Which does not make sense...
  12. MajP

    Trying to wrap my brain around table normalization in a 1:many relationship

    If you are keeping a historical record of each year in A approach then you can do something like Students-Homerooms --- StudentHomeroomID - (autonumber) --- StudentID_FK (foreign key to student table) --- HomeRoomID_FK (foreign key to homeroom table) --- CalendarYear Now you create a composite...
  13. MajP

    VBA class modules & factory design

    @bodders24 I am interested in your approach to creating a class what appears to be similar to a "strong type dataset" in ado.net. I do not know how it is done in entity framework now a days. I wanted to see if I could do it and if this is similar to your approach. I did a very rudimentary...
  14. MajP

    Solved Multi-Select List Box, Distinct Values

    Dim strSelected As String Dim varItem As Variant Dim aItems() As String Dim newItem As String Dim i As Integer Dim found As Boolean With Me.lstLiveWorksOrderList For Each varItem In .ItemsSelected newItem = .Column(2, varItem) aItems =...
  15. MajP

    VBA class modules & factory design

    Are you set on doing this in Access? I think this is one of those cases where it would be far easier to code in something like .Net. It sounds like you are basically building strongly typed dataset objects which is a robust feature in ado.net. Especially if pulling in multiple data sources...
  16. MajP

    Baffled by Time

    Really? So lets say you have this displayed. 10/27/2025 6:36 PM in a field You would find it very useful to see this 45957.775 instead? WhatsThere: cdbl([SomeDateField])
  17. MajP

    Generating report on a dynamic subform

    Also I would get rid of Bang notation here because you lose intellisense and making it hard to debug. You cannot verify that those names are correct lngOrderID = Nz(Me!OrderID, 0) lngPatientID = Nz(Me!PatientID, 0) strTestName = Nz(Me!TestName, "") Maybe it is Patient_ID, or NameOfTest. With...
  18. MajP

    Generating report on a dynamic subform

    Private Sub Report_Open(Cancel As Integer) On Error GoTo Err_Handler Dim strReportName As String Dim ctlSub As Control ' --- 1. Check that ReportToLoad exists --- If Not TempVars.Exists("ReportToLoad") Then MsgBox "Missing ReportToLoad variable.", vbExclamation, "Report_Open" Cancel = True...
  19. MajP

    How to give a fancied DBA read only version of the tables.

    Normally when you data warehouse you denormalize the data, you do not mirror your tables. That is inefficient for most reporting. You should flatten out as much as possible before exporting.
  20. MajP

    My query lists 108 current members, but a form based on it lists all 400 members. Why?

    In this case the many to many is so simple since you are only picking a category without a lot of related fields. And when you create a new contact you are likely to already know all the categories and probably that list of categories is relatively set. Often in a many to many the related...
Back
Top Bottom