Weird Cascading Combo Results

P

pfm721

I have a cascading combo that is returning the correct results however it
repeats them endlessly instead of stopping a the last one.

For instance when I click on the drop down in the second box it should read

Dr. Gupta
Dr. Farr

instead it reads

Dr. Gupta
Dr. Farr
Dr. Gupta
Dr. Farr
Dr. Gupta
Dr. Farr
Dr. Gupta
Dr. Farr

etc as far as I scroll down.

any ideas? I am sure that I am missing something easy.
 
W

Wayne-I-M

Can you post the AfterUpdate event code of the 1st combo so we can see what
the problem may be although it is likely this is not a combo problem but a
query problem. Have a look at the query that the 2nd combo is based on and
see if you can work out the problem. If then then post the sql of the query
to see if anyone can spot the error
 
P

pfm721

Here is the After Update Event. I don't see anything that would cause the
problem that I am having. Then again I am not exactly a seasoned Access
programmer. :)

Private Sub Location_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "AddVendor"
If Me.Location = "<NEW>" Then
If MsgBox("Are you sure you want to add a new vendor?", vbQuestion + _
vbYesNo + vbDefaultButton2 + vbCritical, " ") = vbYes Then
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria, acFormAdd
End If
Me.Refresh
End If
Me.Refresh
cboDoctorName.Requery
End Sub
 

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