Limit Combo content on DS Subform HELP please

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

Guest

Hi friends,
I have a subform in DS view. I have two bound combo boxes on this subform.
First cboCrops is bound to CropID with row source from tblCrops. Second
combo, cboPlantingDetails and its row source is a query and bound to
PlantingDetailsID and lists all planting details (which is made up of records
from different tables)

What I would like to do is select a crop from the cboCrops and limit the
records in the query behind cboPlantingDetails to the chosen and assigned
crop.

I have looked up the http://www.mvps.org/access/forms/frm0028.htm and took
the second option of assigning the criteria variable to cboCrops and
requeried cboPlantingDetails from cboCrops AfterUpdate Event
(Me.cboPlantingDetails.Requery).

Here is the criteria string in CropID column of the query behind the
cboPlantingDetails.
[Forms]![frmOrders]![frmOrderDetails]![cboCrops]

But the dropdown on cboPlantingDetails is empty.

Can anyone help me out on this. I really need it.

Thanks alot in advance.
 
niuginikiwi said:
I have a subform in DS view. I have two bound combo boxes on this subform.
First cboCrops is bound to CropID with row source from tblCrops. Second
combo, cboPlantingDetails and its row source is a query and bound to
PlantingDetailsID and lists all planting details (which is made up of records
from different tables)

What I would like to do is select a crop from the cboCrops and limit the
records in the query behind cboPlantingDetails to the chosen and assigned
crop.

I have looked up the http://www.mvps.org/access/forms/frm0028.htm and took
the second option of assigning the criteria variable to cboCrops and
requeried cboPlantingDetails from cboCrops AfterUpdate Event
(Me.cboPlantingDetails.Requery).

Here is the criteria string in CropID column of the query behind the
cboPlantingDetails.
[Forms]![frmOrders]![frmOrderDetails]![cboCrops]

But the dropdown on cboPlantingDetails is empty.


Could be several things wrong here. The most obvious is
that the correct reference in the criteria should be:

[Forms]![frmOrders]![frmOrderDetails].FORM![cboCrops]

but older versions of Access were a little sloppy about
checking that, so what you had might work?

Another possible issue is to double check if the combo box's
BoundColumn property matches up with the CropID field and
that the ColumnCount property matches the number of columns
in the RowSource table/query.
 
Thanks Marshall,
I will look into these points and try them out...
thanks for the suggestions..
 
Back
Top