Error 438

G

Guest

Hello:
I am trying to replicate the Northwind example where you pick a
customer from the drop down and it fills in all the info, however I keep
getting an error if I add more than one line of code.

I have my code in the event handler after update on the combo box to be :

Private Sub CustomerName_AfterUpdate()
If Not IsNull(Me!CustomerName) Then
Me!AddressTextBox = Me!CustomerName.Column(1)
Me!Address2 = Me!CustomerName.Column(2)
End If
End Sub

But when I run the form I get error 438 which says it cannot process this
object or method.

If I take out that 2nd line then it works fine but I need to fill in more
than just addressTextBox, I have address 2 and city bla bla bla.

Any help would be appreciated.

Paul
 
D

Douglas J Steele

How many columns have you indicated are in the combo box (the Column Count
property)?
 
G

Guest

Thanks for the quick response on this,

I found that the LABEL is differently named than the TEXT BOX itself.

How embarrassing, and the name was not matching. That is why I was getting
that error.

Thanks so much for your help,

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top