Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Trying to get message box to appear

I'm using the following code to attempt to get a message box to appear but it doesn't appear when I select "Referral from associate" from the combobox.

??

Private Sub cboComboBox_AfterUpdate()

    If Me.cboComboBox.Column(1)= "Referral*" Then
        MsgBox "This is a referral"
    End If

End Sub

Open in new window


--Steve
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Put in a break point (F9) on the If line, or add a STOP before that.

Then execute and see what's in column (1).

My guess is your off one column, because columns are zero based (first column is 0) unlike the settings in the property page, which start at 1 when setting things like bound column.

Jim.
Avatar of SteveL13

ASKER

Jim,

I did your suggestion.  What I see when I hover over the If... Then line is what I expect...

"Referral from associate"

And then I "Step Into" and it just goes to the End If line.  Doesn't stop at the MsgBox line.
Almost like the wildcard code is wrong.
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That was it.  Thanks.