Search results

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

    Speed Up Query

    @Mister-B, if you want help on restructuring this and moving the data this group can help. You may think that is too much work, but you will quickly find out a little work now will save lots of time later. For example this query would be a one liner with a properly designed db. Moving all the...
  14. MajP

    Solved Treeview nodes error

    From what I am seeing it appears to load all the nodes with the proper tag, but somehow it is lost later or a specific node does not have a tag. Without seeing your application, I do not think I can help. There is no place that the code clears the tag so that is unlikely. There is a mistake in...
  15. MajP

    SQL Code in Access Report

    My point was more about the ease of building, ease of error checking, and ease of use. Once you build your query you will immediately see the results and if they are not quite right you can easily modify the query. Then your call to the query is extremely simple using a dlookup and a given year.
  16. MajP

    SQL Code in Access Report

    That is hard to debug with all the formatting and logic. I would make a single query qryDonorsPerYear do an aggregate query where constituency = Alumni Then your formula is dlookup("NumberDonors","qryDonorsPerYear","DonorYear = " & year(date) - 1)
  17. MajP

    Solved Treeview nodes error

    When the class loads the tree and adds the node it reads the query and puts the Identifier into the tag property Do Until Me.Recordset.NoMatch currentID = Me.Recordset.Fields(ID_Field) currentText = Me.Recordset.Fields(Node_Text_Field) currentIdentifier =...
  18. MajP

    Solved Treeview nodes error

    Can you post an image of your query. I am guessing the query is not formed correctly and therefore the "Identifier" is not in the tag property. Notice that the identifier has to be the prefix to the ID which is "Identifier & RealPK"
  19. MajP

    Question on Comboboxes

    In VBA there is null propagation, that was the recommendations for a "+" Null + String = null Null & string = string Public Sub Test() Dim CompanyName As Variant Dim lastName As Variant Dim firstName As Variant firstName = "Eddie" lastName = "Money" CompanyName = "Acme"...
  20. MajP

    Solved Treeview nodes error

    Trouble shoot that with a debug.print I only ever use numeric PKs. If you build your node query correctly, you concatenate the identifier and the real PK together to build the index. Then you store the identifier in the Tag property. Example ID in node query becomes Location_1 the Node index...
Back
Top Bottom