No data in subform if recordcount is 1

liddlem

Registered User.
Local time
Today, 20:01
Joined
May 16, 2003
Messages
339
I have started a new Navigation form (Horizontal with Vertical tabs left - its a template from Access2013)
I have two drop down boxes (Category and Activity)
When these two have a value, my subform (Frm_ActivitySessions) which references a query (Qry_ActivitySessions) should show all the sessions that relate to the Activity that was selected.

If the result set of the underlying query returns only ONE record, then the subform shows zero records. However, If there are more than one record, then all the records are returned.

Anybody got any ideas?
 
Shot in the dark, but are there master/child links on the subform control that may only be affecting the data in this circumstance? If not, can you attached a sample of the db here that exhibits the problem?
 
Hi Paul
I think the problem may have something to do with the fact that its parent form is in the Navigation form. So, in effect, what I think is a subform, is in reality a subform of a subform.
(ie Navigation Form / Category Form / Activity Form)

The two combo's live on the Category form and there is a cascade from Combo1 to combo2.
IE: when the user selects an option in combo 1, the 'afterUpdate' event fires to refresh the options in combo 2 (Which are limited by a query in its 'Row Source' property)

Likewise, when Combo2 is updated, the 'AfterUpdate' event does the following.

Me.Act_ID = Me.Cbo_Activity.Column(0) 'Update hidden field on the Category form
DoCmd.Requery Qry_PD_ActivitySessions 'Requery the underlying data for the Activity Form

Hope that makes sense?
 
Makes sense but I still don't get why it would only affect the subform when there was only one record.
 

Users who are viewing this thread

Back
Top Bottom