Lounge - Help with combo boxes in Subform
Asked By Ngan Ly on 02-Mar-09 10:53 PM
Hi,
I have created a form with two combo boxes. When users choose an option in the first combo box, it will list the choices available in the second combo box based on the first combo box. The form works fine.
However, when I place this form as a subform in another form, I get a message asking me for the parameter when I click on the second combo box in the subform.
Please help! Why is it not working when it's a subform??!
Thank you!
Sally
Combo in subform
Ngan Ly replied to Santhosh N on 03-Mar-09 12:22 AM
Hi,
Here are the info:
Table #1: GL Accounts
1011
1032
1033
1052
1154
1578
etc...
Table#2: GL Accounts (connector) & Line Items
1011 15
1032 16
1033 17
1052 18
1545 19
1578 20
etc...
I then opened a new form titled "AccountInfo"
I created the first combo box (labeled "combo3") for the GL accounts
I then created a query linking the two tables by the GL accounts with the following in the criteria:
[forms]![AccountInfo]![combo3]
The 2nd combo box (labeled "combo4") is based on the query created for the Line Item.
Finally, the first combo box ("combo3") has the following in the after update:
Private Sub Combo3_AfterUpdate()
Me.Combo4.Requery
End Sub
Everything works fine in the form. Only when I place this form as a sub-form does it asks for a parameter. Maybe I need to change the criteria in the query or something since it seems that it is missing a link or something?
Thank you very much!
Sally
Santhosh N replied to Ngan Ly on 03-Mar-09 08:58 AM
after you change to sub form please check if all the ids of the controls are intact...
If they are fine, you can check by debugging, something might have missed...:)