Search results

  1. 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...
  2. 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.
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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 =...
  9. 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...
  10. 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])
  11. 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...
  12. 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...
  13. 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.
  14. 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...
  15. MajP

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

    That is a personal design consideration. I almost never have a main form and subform where you can add/edit new mainform records and subform records. I always have a separate pop up for my main form records. Less confusing IMO and better/easier to enforce data integrity. I would have an add...
  16. MajP

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

    Also with a many to many you may want to also create the other view. You can make the main form contact category and the subform then list all contacts.
  17. MajP

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

    Main form should only include contacts and contact types. Subform includes contact-contact categories and category type. Since some records have multiple categories you are getting multiple records if you include the junction table in main form.
  18. MajP

    Solved Node level path

    Public Function GetLevelIdentifier(PK As Long, Identifier As String) As String If Identifier = "LO" Then GetLevelIdentifier = DLookup("LocNo", "tblLocations", "LocID = " & PK) End If End Function I assume that this should be GetLevelIdentifier = DLookup("LOPath", "tblLocations"...
  19. MajP

    Solved Treeview address

    That was my point I was trying to make. In the E2E demo I had an unnecessarily complicated way to do this by using a dictionary to do the same thing. Then I realized since I store the identifier in the table the parent identifier is always stored first when looping the nodes. I can just read...
  20. MajP

    Solved Treeview address

    Just a wrapper on a dlookup to return the parent level identifier stored in the tables. Because you loop the nodes in order the parent identifier will always get entered first.
Back
Top Bottom