G
Guest
I'm trying to determine the rowsource for a combo box depending on what group
(stored in glGroup) the user belongs to. So on the _Current even of the main
form, I'm using strSource as the source for the combo box. Now, if the
usergroup is 1, the combo box works fine. But if the usergroup is 2, then the
combo box has no records (and there is data matching the fields I'm looking
for in the table). Anything jump out at anyone?
If glGroup = "1" Then strSource = "SELECT tblChartsAvailable.ChartName,
tblChartsAvailable.EventChartID, tblChartsAvailable.ChartEvent,
tblChartsAvailable.ChartOrganization FROM tblChartsAvailable WHERE
(((tblChartsAvailable.ChartEvent)=[forms]![frmChartsByEvent]![Event]))"
If glGroup = "2" Then strSource = "SELECT tblChartsAvailable.ChartName,
tblChartsAvailable.EventChartID, tblChartsAvailable.ChartEvent,
tblChartsAvailable.ChartOrganization FROM tblChartsAvailable WHERE
(((tblChartsAvailable.ChartEvent)=[forms]![frmChartsByEvent]![Event])) AND
((tblChartsAvailable.ChartOrganization) = """ & glOrganization & """)"
Forms![frmChartsByEvent]![frmChartsByEventSub]![EventChartID].RowSource =
strSource
(stored in glGroup) the user belongs to. So on the _Current even of the main
form, I'm using strSource as the source for the combo box. Now, if the
usergroup is 1, the combo box works fine. But if the usergroup is 2, then the
combo box has no records (and there is data matching the fields I'm looking
for in the table). Anything jump out at anyone?
If glGroup = "1" Then strSource = "SELECT tblChartsAvailable.ChartName,
tblChartsAvailable.EventChartID, tblChartsAvailable.ChartEvent,
tblChartsAvailable.ChartOrganization FROM tblChartsAvailable WHERE
(((tblChartsAvailable.ChartEvent)=[forms]![frmChartsByEvent]![Event]))"
If glGroup = "2" Then strSource = "SELECT tblChartsAvailable.ChartName,
tblChartsAvailable.EventChartID, tblChartsAvailable.ChartEvent,
tblChartsAvailable.ChartOrganization FROM tblChartsAvailable WHERE
(((tblChartsAvailable.ChartEvent)=[forms]![frmChartsByEvent]![Event])) AND
((tblChartsAvailable.ChartOrganization) = """ & glOrganization & """)"
Forms![frmChartsByEvent]![frmChartsByEventSub]![EventChartID].RowSource =
strSource