Hello I have a Lookup Table that updates a child table through on combo called MERCodes. What happens is the user picks a code such as 7ca or 3ca and it populates 2 two to three fields depending on which the code. I need to add two more colums to the lookup table so that it will update two more fields, the problems I get an error message in my VBA code. Can anyone tell me what I am doing wrong please. I have to add the [StateCategory] and the [StateServicesCovered] also. Both tables have the same fields only one is used to update the other, by doing this it makes it easier and faster for the users to do data entry
Error Message: "compiler error - method or data member not found".
this is my original code:
Code:
Private Sub MERCodes_AfterUpdate()
Me.Catagory_for_hours = Me.MERCodes.Column(2)
Me.Catagory_for_hours.SetFocus
Me.Catagory_for_hours.Dropdown
Me.Services_Covered = Me.MERCodes.Column(3)
Me.Services_Covered.SetFocus
Me.Services_Covered.Dropdown
Me.NameofWorkshop = Me.MERCodes.Column(4)
Me.NameofWorkshop.SetFocus
Me.NameofWorkshop.Dropdown
Me.MERCodes.SetFocus
End Sub
Here is the code I added but its giving me an error
Code:
Private Sub MERCodes_AfterUpdate()
Me.Catagory_for_hours = Me.MERCodes.Column(2)
Me.Catagory_for_hours.SetFocus
Me.Catagory_for_hours.Dropdown
Me.Services_Covered = Me.MERCodes.Column(3)
Me.Services_Covered.SetFocus
Me.Services_Covered.Dropdown
Me.NameofWorkshop = Me.MERCodes.Column(4)
Me.NameofWorkshop.SetFocus
Me.NameofWorkshop.Dropdown
Me.StateCategory = Me.MERCodes.Column(5)
Me.StateCategory.SetFocus
Me.StateCategory.Dropdown
Me.StateServicesCovered = Me.MERCodes.Column(6)
Me.StateServicesCovered.SetFocus
Me.StateServicesCovered.Dropdown
Me.MERCodes.SetFocus
End Sub