Popup ListBox can't see main form control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I click Forms!SWB!StaffSearchComBx, a popup called SWBStaffWarning
appears. SWBStaffWarning contains StaffEndowLstBx, with a RowSource taken
from a QueryBuilder statement with this clause:
WHERE
((([MtchStaffTbl].[MchStfIDCode])=[Forms]![SWB]![StaffSearchComBx].[Column(0)]))

But Access asks me for the meaning of
[Forms]![SWB]![StaffSearchComBx].[Column(0)]
before it opens the form, even though it is perfectly clear in the Immediate
window. When I manually enter the definition, StaffEndowLstBx works fine.

How come?

Thanks!
 
Remove the column number, you can't specify it in a query

WHERE
[MtchStaffTbl].[MchStfIDCode]=[Forms]![SWB]![StaffSearchComBx]
 
Now I don't get the Access request for the definition, but without the column
specification the combox is defined as the row number, not the content of the
selection. How do I fix that?

Thanks
--
Dave


Ofer Cohen said:
Remove the column number, you can't specify it in a query

WHERE
[MtchStaffTbl].[MchStfIDCode]=[Forms]![SWB]![StaffSearchComBx]

--
Good Luck
BS"D


LongWayFromHome said:
When I click Forms!SWB!StaffSearchComBx, a popup called SWBStaffWarning
appears. SWBStaffWarning contains StaffEndowLstBx, with a RowSource taken
from a QueryBuilder statement with this clause:
WHERE
((([MtchStaffTbl].[MchStfIDCode])=[Forms]![SWB]![StaffSearchComBx].[Column(0)]))

But Access asks me for the meaning of
[Forms]![SWB]![StaffSearchComBx].[Column(0)]
before it opens the form, even though it is perfectly clear in the Immediate
window. When I manually enter the definition, StaffEndowLstBx works fine.

How come?

Thanks!
 
I got it! I changed the bound column from zero to 1. I was misled by having
only one column in the combox. Thanks, Ofer!
--
Dave


LongWayFromHome said:
Now I don't get the Access request for the definition, but without the column
specification the combox is defined as the row number, not the content of the
selection. How do I fix that?

Thanks
--
Dave


Ofer Cohen said:
Remove the column number, you can't specify it in a query

WHERE
[MtchStaffTbl].[MchStfIDCode]=[Forms]![SWB]![StaffSearchComBx]

--
Good Luck
BS"D


LongWayFromHome said:
When I click Forms!SWB!StaffSearchComBx, a popup called SWBStaffWarning
appears. SWBStaffWarning contains StaffEndowLstBx, with a RowSource taken
from a QueryBuilder statement with this clause:
WHERE
((([MtchStaffTbl].[MchStfIDCode])=[Forms]![SWB]![StaffSearchComBx].[Column(0)]))

But Access asks me for the meaning of
[Forms]![SWB]![StaffSearchComBx].[Column(0)]
before it opens the form, even though it is perfectly clear in the Immediate
window. When I manually enter the definition, StaffEndowLstBx works fine.

How come?

Thanks!
 
Back
Top