Filter by form and subform in ADP

Discussion in 'Microsoft Access ADP SQL Server' started by Edgar, Sep 21, 2009.

  1. Edgar

    Edgar Guest

    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
     
    Edgar, Sep 21, 2009
    #1
    1. Advertisements

  2. 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)


    "Edgar" <> wrote in message
    news:...
    > 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
     
    Sylvain Lafontaine, Sep 21, 2009
    #2
    1. Advertisements

  3. Edgar

    charlie Guest

    smiley central
    "Edgar" <> wrote in message
    news:...
    > 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
     
    charlie, Sep 22, 2009
    #3
  4. Edgar

    Edgar Guest

    I forgot to mention.
    I use Access 2007 and SQL server 2005.
    --
    Thanks,

    Edgar


    "Sylvain Lafontaine" wrote:

    > 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)
    >
    >
    > "Edgar" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
     
    Edgar, Sep 22, 2009
    #4
  5. Edgar

    Edgar Guest

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

    --
    Thanks,

    Edgar


    "Sylvain Lafontaine" wrote:

    > 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)
    >
    >
    > "Edgar" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
     
    Edgar, Sep 22, 2009
    #5
  6. 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)


    "Edgar" <> wrote in message
    news:D...
    > Both the master and the detail form have a table as recordsource, no
    > stored
    > procedures.
    >
    > --
    > Thanks,
    >
    > Edgar
    >
    >
    > "Sylvain Lafontaine" wrote:
    >
    >> 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)
    >>
    >>
    >> "Edgar" <> wrote in message
    >> news:...
    >> > 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

    >>
    >>
    >>
     
    Sylvain Lafontaine, Sep 22, 2009
    #6
  7. Edgar

    Edgar Guest

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


    "Sylvain Lafontaine" wrote:

    > 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)
    >
    >
    > "Edgar" <> wrote in message
    > news:D...
    > > Both the master and the detail form have a table as recordsource, no
    > > stored
    > > procedures.
    > >
    > > --
    > > Thanks,
    > >
    > > Edgar
    > >
    > >
    > > "Sylvain Lafontaine" wrote:
    > >
    > >> 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)
    > >>
    > >>
    > >> "Edgar" <> wrote in message
    > >> news:...
    > >> > 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
    > >>
    > >>
    > >>

    >
    >
    >
     
    Edgar, Sep 25, 2009
    #7
  8. 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)


    "Edgar" <> wrote in message
    news:...
    > 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.
    > ---
    > Edgar
    >
    >
    > "Sylvain Lafontaine" wrote:
    >
    >> 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)
    >>
    >>
    >> "Edgar" <> wrote in message
    >> news:D...
    >> > Both the master and the detail form have a table as recordsource, no
    >> > stored
    >> > procedures.
    >> >
    >> > --
    >> > Thanks,
    >> >
    >> > Edgar
    >> >
    >> >
    >> > "Sylvain Lafontaine" wrote:
    >> >
    >> >> 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)
    >> >>
    >> >>
    >> >> "Edgar" <> wrote in message
    >> >> news:...
    >> >> > 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
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Sylvain Lafontaine, Sep 25, 2009
    #8
  9. Edgar

    Edgar Guest

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

    Thanks,
    --
    Edgar


    "Sylvain Lafontaine" wrote:

    > 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)
    >
    >
    > "Edgar" <> wrote in message
    > news:...
    > > 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.
    > > ---
    > > Edgar
    > >
    > >
    > > "Sylvain Lafontaine" wrote:
    > >
    > >> 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)
    > >>
    > >>
    > >> "Edgar" <> wrote in message
    > >> news:D...
    > >> > Both the master and the detail form have a table as recordsource, no
    > >> > stored
    > >> > procedures.
    > >> >
    > >> > --
    > >> > Thanks,
    > >> >
    > >> > Edgar
    > >> >
    > >> >
    > >> > "Sylvain Lafontaine" wrote:
    > >> >
    > >> >> 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)
    > >> >>
    > >> >>
    > >> >> "Edgar" <> wrote in message
    > >> >> news:...
    > >> >> > 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
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
    Edgar, Sep 29, 2009
    #9
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BJ Freeman

    Re: ADP routine fails in ADP.

    BJ Freeman, Jul 7, 2003, in forum: Microsoft Access ADP SQL Server
    Replies:
    0
    Views:
    682
    BJ Freeman
    Jul 7, 2003
  2. Vadim Rapp

    Re: ADP routine fails in ADP.

    Vadim Rapp, Jul 7, 2003, in forum: Microsoft Access ADP SQL Server
    Replies:
    0
    Views:
    638
    Vadim Rapp
    Jul 7, 2003
  3. Carl

    2002 ADP versus 2003 ADP

    Carl, Dec 11, 2003, in forum: Microsoft Access ADP SQL Server
    Replies:
    3
    Views:
    407
    Sylvain Lafontaine
    Dec 12, 2003
  4. Malcolm Cook
    Replies:
    0
    Views:
    337
    Malcolm Cook
    Apr 22, 2004
  5. Bonno Hylkema

    Adp form looses filter when filter criteria are updated

    Bonno Hylkema, Jun 16, 2006, in forum: Microsoft Access ADP SQL Server
    Replies:
    4
    Views:
    353
    Bonno Hylkema
    Jun 19, 2006
Loading...

Share This Page