Search results

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

    Solved Transferring data from unbound MS Access Form to another form

    This is why you should not use bang but dot notation wherever possible and do not EVER EVER put spaces in any name of anything. Are you sure you have a control of that name? Me![sfrmPosLineDetails Subform] but this would have told you if using dot and a normal name. me.sfrmProslineDetails Why...
  16. MajP

    Solved Treeview address

    These are the values that I normally save for most Trees. TreeviewSort - If you read the nodes from the top to bottom that is the order they appear regardless of level NodeLevel - How far it is indented in the branch. Top level is 1 LevelSort - For a give group of child nodes this is the order...
  17. MajP

    Programmatically construct a constant's name and return its value

    I think I would update the class so you have run time "setable" constants and design time read only. 1. Provides intellisense for coding 2. Can set a "constant" only once and throws error if you try a second time. 3. throws and error if "constant" not set and try to access Private...
  18. MajP

    Programmatically construct a constant's name and return its value

    What is the purpose that you are trying to achieve? The only thing I can guess is that you want to set the value once like a constant and not allow your code to reassign. If that is the case could you make a single class with all your constants and do something like. Private pCon1 As Variant...
  19. MajP

    Solved Treeview address

    I am not following your numbering scheme. Is it the outline level like E2E demo 1 --1.1 --1.2 --1.3 -----1.3.1 -----1.3.2 2 3
  20. MajP

    Speed Up Query

    In my government experience it was always the opposite. There never seemed to be time or money to do it right the first time, but there always seemed to be some miracle where we found the time and money to do it a second time.
Back
Top Bottom