Search results

  1. C

    Change foreign key

    No, probably not. But I do want to empty the FK and then refill it, not do it all at once. The more I think about it, the more I like the junction table. It makes sense. Thank you all for your input.
  2. C

    Change foreign key

    The FK isn't required, but key restraints will not let me remove it.
  3. C

    Change foreign key

    Pat Hartman: I'm having a weird problem with the forum software so I can't post there. There is no problem at all with replacing a FK with a new FK value. It just has to be a valid value. Also if the FK is not required, it could be null but I don't think that makes sense in this case. If you...
  4. C

    Change foreign key

    Even though there is only one inventory item to each location? And then there would be no foreign key in Inventory?
  5. C

    Change foreign key

    I have a table of locations. These locations are permanent and never removed. I have inventory in those locations that often needs to be moved to another location. Inventory has a foreign key tied to the primary key in locations. If I want to move Inventory to a different location, all I need to...
  6. C

    Solved Majp Treeview

    No. the main form of frmDetail. the subform is fsubdetail. Detail means it's not the list view but the detail of each record. It is working great now. Tested and retested. ;)
  7. C

    Solved Majp Treeview

    Oh Great! I did it again... spoke without knowing my stuff. I put the current event on the detail form when you meant for me to put it on the Form. I have it fixed and I'm not getting that error anymore and I thank you very much!
  8. C

    Solved Majp Treeview

    ok. Folowed your instructions to the T: Me.Parent.TVW.Nodes(strKey).Selected = True Error box message: 91 object variable or with block variable not set. Pressing enter moves on. This is only when the form is opening. Moving from record to record does not raise this error.
  9. C

    Solved Majp Treeview

    Ok. I get it. Still getting object variable not set whenever the form opens... Private Sub Form_Current() On Error GoTo errlbl Dim strKey As String If CurrentProject.AllForms("frmDetail").IsLoaded Then strKey = "IT" & Me.ItemID Me.Parent.TVW.Nodes(strKey).Selected = True...
  10. C

    Solved Majp Treeview

    Brilliant! Thank you so much!
  11. C

    Solved Majp Treeview

    The treeview is the form with detail view as the subform. So when I move through the records on the subform, the treeview updates Private Sub Form_Current() On Error GoTo errlbl Dim strKey As String strKey = "IT" & Me.ItemID Me.Parent.TVW.Nodes(strKey).Selected = True...
  12. C

    Solved Majp Treeview

    Me again... This is the code that was actually calling the Object Variable Error when the form opens that I was complaining about yesterday. I went back to your treeview and noted that this code is under AfterUpdate on frmE2E. I marked it to step through and couldn't ever get it to run so I...
  13. C

    Majp Treeview Error

    I am so, So, SO, SORRY! I forgot the subform loads first and it's not your error at all. (Not that I ever thought it was!) The subform load event is where the problem is and I am slinking off now...
  14. C

    Majp Treeview Error

    Yes, the tree loads but putting a stop at the first line sends the error before it gets there. I use this treeview on several programs.... File Location data, Recipes & Cookbooks, Nursery database... It works there.
  15. C

    Majp Treeview Error

    Is this what you need? Option Compare Database Option Explicit Public WithEvents TVW As TreeviewForm Private Sub Form_Load() Set TVW = New TreeviewForm TVW.Initialize Me.XTree.Object, "qryUnion", "None", False, lt_fullload With TVW.TreeView .Font.Size = 10 .Font.Bold = True...
  16. C

    Majp Treeview Error

    Before my form loads I get Error 91 object variable load here: Set TVW = New TreeviewForm Pressing enter moves on and everything seems to work but I can't trace it because it's immediate and doesn't move. I'm using Version 19
  17. C

    Form doesn't show new record

    I Got It! 20 strLinkCriteria = "ContactsID = " & NewContactID 30 Me.Requery 40 Set rst = Me.RecordsetClone 50 rst.FindFirst strLinkCriteria 60 If Not rst.EOF Then 70 Me.Bookmark = rst.Bookmark 80 End If 90 Me.FirstName.SetFocus Part of the problem...
  18. C

    Form doesn't show new record

    oh. I want to find an existing record that I just created with NewContactID.
  19. C

    Form doesn't show new record

    Ahh... you make it seem so easy :confused::confused: Dim NewRecord NewRecord = "ContactID = " & NewContactID() DoCmd.GotoRecord acDataForm, "frmDetail", NewRecord This returns a type mismatch. I don't think I want acNewRecord because it's already created. But I can't seem to get to my record.
  20. C

    Form doesn't show new record

    The following code gets a new Contact ID, and preloads a new record but the form does not move to the new record. Public Sub AddRecord() On Error GoTo Error_Handler Dim db As DAO.Database Dim rst As DAO.Recordset Dim frm As Form Dim strLinkCriteria Set db = CurrentDb() strLinkCriteria =...
Back
Top Bottom