Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile Error: Method or data member not found

Status
Not open for further replies.

JillianM

Technical User
Jun 10, 2010
23
US
Ok, please forgive me. I know very little about coding, but this same code works perfectly in another db I am using.

I am trying to update several fields in a form based on the selection of a combo box, in this case Combo53. I set up the code and ran it and get an error stating "Compile Error: Method or Data Member Not Found" with the Private Sub Combo53_AfterUpdate()highlighted in yellow.

Private Sub Combo53_AfterUpdate()
Me.FirstName = Me.Combo53.Column(1)
Me.Profession = Me.Combo53.Column(2)
Me.NPI = Me.Combo53.Column(3)
Me.LIC = Me.Combo53.Column(4)
Me.ADDRESS1 = Me.Combo53.Column(5)
Me.Address2 = Me.Combo53.Column(6)
Me.City = Me.Combo53.Column(7)
Me.State = Me.Combo53.Column(8)
Me.Zip = Me.Combo53.Column(9)
Me.EmailAdd = Me.Combo53.Column(10)
Me.Phone = Me.Combo53.Column(11)
End Sub

Any tips or suggestions? Thanks!
 

You may be better of asking this question in here: forum181

But also consider this change to your code:
Code:
Private Sub Combo53_AfterUpdate()

With Me.Combo53
  Me.FirstName = .Column(1)
  Me.Profession = .Column(2)
  Me.NPI = .Column(3)
  Me.LIC = .Column(4)
  Me.ADDRESS1 = .Column(5)
  Me.Address2 = .Column(6)
  Me.City = .Column(7)
  Me.State = .Column(8)
  Me.Zip = .Column(9)
  Me.EmailAdd = .Column(10)
  Me.Phone = .Column(11)
End With
End Sub

BTW - Nothing is highlighted in yellow

Have fun.

---- Andy
 
Thanks! Still getting the error but I will repost in a different location!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top