Stan S
Stan S

Reputation: 29

Cascading Combo Boxes Within a Sub Form

I have a cascading combo box within a subform. I modified the row source for the second combo box based on criteria from the initial combo box as such

Like "*" & [Forms]![SubFormName]![Combo1Name] & "*"

I then added this to the after update event of the first combo box

Me.Combo2Name = vbNullString
Me.Combo2Name.Requery

This works great if opening only the subform directly. However, when in the parent form it prompts "Enter Parameter Value" if I key it in manually when prompted it works fine.

But I can't seem to have it push the Combo1 values automatically...HELP TYIA!

UPDATE I removed the form qualifier as mentioned below Like "*" & [Combo1Name] & "*" Works great now!

Upvotes: 0

Views: 723

Answers (1)

June7
June7

Reputation: 21379

Combobox RowSource SQL statement does not require the form qualifier prefix when both controls are on the same form. So simplify the criteria:

Like "*" & [Combo1Name] & "*"

Upvotes: 1

Related Questions