few times, but I've hit a wall and require some help.
I have various combo boxes that contain values that are both "current"
and "not current". The problem is if you try to limit the drop down to
only the "current" values then your old records show a blank if the
field contains a "not current" value.
One of the solutions I have found is this:
SELECT DISTINCTROW tblListBusArea.BusAreaID, tblListBusArea.BusAreaName, tblListBusArea.Active.... in the Row Source and a requery in AfterUpdate event.
FROM tblListBusArea
WHERE (((tblListBusArea.Active)=True))
OR (((tblListBusArea.BusAreaID)=[Forms]![frmSubmissions]![cboBusArea]))
ORDER BY tblListBusArea.BusAreaName;
This solution works nicely on the main form, but doesn't work on a
subform.
The reason (I believe) I found for this is that Access will set the
combo boxes of the subforms when opening up the main form. If the
subform combo box contains "not current" value, then the combo box
remains blank, because the data had not been loaded when the rowsource
was created. Correct me if I'm wrong.
The code I'm using on the subform is:
SELECT tblListTeams.TeamID, tblListTeams.TeamName, tblListTeams.ActiveI envisioned leaving the rowsource for the subform combo boxes blank
FROM tblListTeams
WHERE (((tblListTeams.Active)=True))
OR (((tblListTeams.TeamID)=[Forms]![frmSubmissions]![chlSubResponses]![cboTeam]))
ORDER BY tblListTeams.TeamName;
and only setting the rowsource in the OnCurrent event of the main form:
Me!chlSubResponses!sfrmResponsesEntry.Form!cboTeam s.RowSource =but that gives me the error:
"SELECT tblListTeams.TeamID, tblListTeams.TeamName, tblListTeams.Active
FROM tblListTeams WHERE (((tblListTeams.Active)=True))
OR (((tblListTeams.TeamID)=[Forms]![frmSubmissions]![chlSubResponses]![cboTeam]))
ORDER BY tblListTeams.TeamName;"
You entered an expression that has an invalid reference to the property Form/Report.I'm lost... Please help.
The property may not exist or may not apply to the object you specified.