Cascading Combo Boxes

desireemm

Registered User.
Local time
Yesterday, 21:34
Joined
Dec 30, 2003
Messages
64
:confused: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


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
 
Might help to know what "an error message" is. What is the column count property of the combo? What is the purpose of all the SetFocus and Dropdown lines other than the last?
 
Sorry forgot to post the error message
Error message
"compiler error - method or data member not found".
 
where statecategory starts is where the error message is, but I checked the spelling several times
 

Attachments

  • compileerrorexample.jpg
    compileerrorexample.jpg
    32.7 KB · Views: 168
You didn't answer the other questions. Does that control come up if you start typing "Me."?
 

Users who are viewing this thread

Back
Top Bottom