Main Form Sub Form Problem

mukudu99

Registered User.
Local time
Today, 14:26
Joined
Dec 22, 2006
Messages
15
hi everyone.
I am having a problem that is making me mad.
I have the following:
main form:BLP_Data1 , selected combo box:cboActivity
subform:BLP_Data2, filtered combo box:cboIndicator
--------------------------------------------------------------------------
in my tables many indicators belong to one activity.
Now i want to filter the cboIndicator on the subform based on the selected activity in the cboActivity on the main form
------------------------------------------------------------------------
The code:
Private Sub cboActivity_AfterUpdate()
Me.BLP_Data2.Form.cboIndicator.RowSource = "SELECT Indicators.IndicatorID, Indicators.IndicatorCode, Indicators.Indicator, Indicators.ActID, Indicators.Report" & _
"FROM Indicators WHERE Indicators.ActID = " & Me.cboActivity.Column(0) & _
"ORDER BY Indicators.IndicatorID ASC;"


Me![BLP_Data2].SetFocus
Me!BLP_Data2.Form!cboIndicator.SetFocus

------------------------------------------------------------------------
When i apply the filter some data in the subform which is in datasheet format is not showing. when i select TRAINING activity i only get TRAINING INDICATORS...the other previously entered indicators are showing blanks but a check on the table confirms that the data is there. When i select say OUTEREACH activity only indicators in that activity show up on the subform data sheet. the TRAINING indicators are blank.... what is happening????

I have attached a sample

Thanks in advance
 

Attachments

Users who are viewing this thread

Back
Top Bottom