Filter by form and subform in ADP

  • Thread starter Thread starter Edgar
  • Start date Start date
E

Edgar

Dear all,

I have a ADP with master-detail forms, like a form SalesOrder, and subform
SalesOrderLines. The link between them has been made with master/child
fields, e.g. SalesOrderID.

If a filter by form is applied on the master form, the lines in the child
form are not refreshed (I mean the wrong lines for the header are shown). It
still shows the lines for the first record it showed before the filter was
applied. Also when browsing through the filtered records (moving to next and
previous records), the subform is not refreshed.

Is this a bug, and hopefully there is a solution for it, or am I doing
something wrong?

Thanks,

Edgar
 
If you are still on Access 2000 then upgrade to 2003. If not, then what's
the exact record source that you are using for both the form and the
subform? It looks like to me that you're not using a stored procedure for
your subform.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
No problem here using Access 2003. How and when are you setting the record
source for the subform? At design time or in one of the form's events?

Also, how is defined the primary key for SalesOrderLines table?

Finally, if you are not to use any stored procedure, I don't see why you are
using ADP instead of a MDB/ACCDB file with ODBC Linked Tables/Views. Much
more easier.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
The recordsource is set at design time, just a property behind the forms.

The sales order lines table has a unique single id field, SalesOrderLineID.
Foreign key is SalesOrderID. Both are autonum integers.

I inhereted the app from someone else. It is a lot of work to change
everything to linked odbc tables. I suppose this should work as well?

Thanks for you help.
 
I've tried to reproduce your problem here with Access 2003, using different
combinations but with no success. Maybe this a bug of Access-ADP 2007.

Are you using form as the subform in your subform control or if you are
directly using the table's name; without any form?

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
The sales order form has a subform control with the sales order lines form
as its source object.

Thanks,
 
Back
Top