You need to add the following line to the GotFocus event of the Product combo:My form stopped working again. It was working perfectly and all I did was format it and now everytime i open it the cboCategory parameter box pops up.
What am I doing wrong??![]()
HI,You need to add the following line to the GotFocus event of the Product combo:
Me.ActiveControl.Requery
Yes I did but unfortunately I didn't fully understand it.did you ever look at the link I provided in post #5?
Don't go off in a huff. It is unlikely you will figure it out for yourself, so you are just cutting off your nose to spite your face.I'm sorry for not acknowledging the individual post; I did however, thank everyone for their assistance in post #22.
I really do appreciate everyone's help but I guess my beginner status is an irritant as this is the second time I have been admonished on this website for not understanding.
My apologies. I will figure it out on my own.
I *think* it was in post #23, but now removed.with respect - if you don't understand, don't just ignore, ask for clarification
I don't see any db uploaded by you so not sure which 4 forms Gasman is referring to but I can now open your gif and what it is indicating to me is you don't have any code (or if you do, it is ineffective) in the combo lost focus or exit event to restore the full list of options- see the example I posted
Private Sub cboProduct_Enter()
cboProduct.RowSource = "SELECT ProductID, ProductName FROM tblProducts WHERE CategoryID=[cboCategory] ORDER BY ProductName"
End Sub
Private Sub cboProduct_Exit(Cancel As Integer)
cboProduct.RowSource = "SELECT ProductID, ProductName FROM tblProducts”
End Sub