I have a Form (frmsOrders) with a subform (frmOrdersDetails Subform). I am trying to automatically fill in the Item Description, Unit and Price when choosing the SKU# from a combobox. I have this working perfectly for the Customer and Address info in the main part of the form, but the same syntax does not work in the Subform.
I have read the 'How to refer to items in Subform' article in the How To section and many posts on the subject. I also had success with this in the past, but it is just not working this time. I'm thinking it had something to do with the way my forms were linked and the relationship I had. I fixed all of those things and the form is working the way I want except for this one thing.
This is what I have in the After Update Event in the Name combobox on the main form and it works fine:
Private Sub Name_AfterUpdate()
Me![Rank] = Me![Name].Column(2)
Me![Address1] = Me![Name].Column(3)
Me![Address2] = Me![Name].Column(4)
Me![City] = Me![Name].Column(5)
Me![State] = Me![Name].Column(6)
Me![ZipCode] = Me![Name].Column(7)
Me![CAPID] = Me![Name].Column(8)
End Sub
I changed the code in the After Update Event in the SKU combobox on the subform to this, but it is not working.
Private Sub SKU_AfterUpdate()
Me![frmOrderDetails Subform].Form![Item Description] = Me![SKU].Column(2)
Me![frmOrderDetails Subform].Form![Unit] = Me![SKU].Column(3)
Me![frmOrderDetails Subform].Form![Price] = Me![SKU].Column(4)
End Sub
Any help would be appreciated.
Thanks