Filter by form and subform in ADP

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
 
S

Sylvain Lafontaine

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)
 
E

Edgar

Both the master and the detail form have a table as recordsource, no stored
procedures.
 
S

Sylvain Lafontaine

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)
 
E

Edgar

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.
 
S

Sylvain Lafontaine

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)
 
E

Edgar

The sales order form has a subform control with the sales order lines form
as its source object.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top