Subform combo box asking for on form control ??

sportsguy

Finance wiz, Access hack
Local time
Today, 14:56
Joined
Dec 28, 2004
Messages
363
I have a subform and one of the input controls has a combo box to select the correct quota level, based upon the sale_com_plan. The control is on the subform, and is populated. . .

SELECT QUOTAS.JC_Bookings FROM QUOTAS WHERE (((QUOTAS.Comp_Plan_Code)=Forms!sfrmESSR.NY_SALESPLAN) And ((QUOTAS.Bonus_Elmt_Code)="NETBOOK"));

when I enter the combo box, the form run time prompt pops up asking for Forms!sfrmESSR.NY_SALESPLAN which is on the form and populated. .

When I open the subform directly, the cbox operates correctly, when i open the form, and the form opens the subform, then it doesn't work ,, ,

what am i missing?

thanks

sportsguy
 
what am i missing?
probably that the syntax is different for a subform than when it is by itself.

This: Forms!sfrmESSR.NY_SALESP LAN

Should be

[Forms]![YourSubformCONTAINER].[Form]![NY_SALESPLAN]

where YourSubformCONTAINER is the name of the control on the main form that houses the subform. You do not use the name of the subform unless it is the same as the container. The container name is the thing to be used.
 
Let me try again, as I was tired. . . after 12 hours of work the brain gets woozy


I have a subform and one of the subform input controls is a combo box to select the correct quota level, based upon the subform control NY_SALESPLAN. The control is on the subform, and is populated. . . the name of the subform is sfrmESSR, the name of the main form is frmESSRPLANNER.

SELECT QUOTAS.JC_Bookings FROM QUOTAS WHERE (((QUOTAS.Comp_Plan_Code)=Forms!sfrmESSR.NY_SALESPLAN) And ((QUOTAS.Bonus_Elmt_Code)="NETBOOK"));

when I enter the subform combo box, a run time prompt pops up asking for Forms!sfrmESSR.NY_SALESPLAN which is on the subform and is populated. .

When I open the subform directly, the cbox operates correctly, when i open the form with the subform, then entering the combo control doesn't work. There are no space or spelling mistakes, any spaces you are reading is due to something on the web form. .

what am i missing?

thanks

sportsguy
 
Just verify that the subform CONTAINER name is also named sfrmESSR (like the subform) and is not named something else.

I have tried all different combinations, all with the same results. .

however, the database crashes during development every once in awhile. . .
could the form be corrupt? (ugh!)

thanks

sportsguy
 
I have tried all different combinations, all with the same results. .

however, the database crashes during development every once in awhile. . .
could the form be corrupt? (ugh!)

thanks

sportsguy
It's possible. Have you tried deleting the subform and then readding it in (after saving the form and doing a compact and repair).
 

Users who are viewing this thread

Back
Top Bottom