Is there a workaround for Access 2007 failure with a control recordsource =SubformControl.Form.Recor

  • Thread starter Thread starter Paul Shapiro
  • Start date Start date
P

Paul Shapiro

After spending hours fighting this problem in a newly upgraded database, I
found Allen Browne's documentation that Access 2007 introduced a new bug
where a control recordsource like this fails:
=iif(SubformControl.Form.RecordsetClone.RecordCount=0, 0,
SubformControl.Form.txtSubformTotal).
Thank you to Allen for nailing the problem. Since I'm using SP1 and seeing
the same problem, I gather it has not been fixed yet.

Has anyone come up with a good workaround? I have avoided the issue for now
by using =SubformControl.Form.NewRecord, but that only worked by allowing
additions in the subform. My original design had a read-only subform, in
which case .NewRecord is never true. I'd prefer to keep the subform
read-only.
 
Paul, if anyone has has a workaround, I'd be glad to hear it too.

At this stage, I'm just using a function in the Control Source. Referring to
frm.RecordsetClone.RecordCount or frm.Recordset.RecordCount works fine in
the code context.
 
Back
Top