Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

How to Select next [value] records?

Discussion in 'Information Technology' started by DevourU, Nov 5, 2005.

  1. DevourU

    DevourU
    Expand Collapse
    Guest

    I have a [value] I want to pass on to a query that will select next [value]
    records. Currently this [value] is in a form, but I can pass it on other
    ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I need to
    insert a [value], not "N". Help? TIA!

    -JS
     
  2. Loading...


  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    Use the data from the form as criteria like --
    [Forms]![YourForm]![YourTextBox] + 1

    The form must be open.

    "DevourU" wrote:

    > I have a [value] I want to pass on to a query that will select next [value]
    > records. Currently this [value] is in a form, but I can pass it on other
    > ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I need to
    > insert a [value], not "N". Help? TIA!
    >
    > -JS
    >
    >
    >
     
  4. DevourU

    DevourU
    Expand Collapse
    Guest

    Thankx for the reply. Do you mean SELECT TOP
    [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.

    -JS

    "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    > Use the data from the form as criteria like --
    > [Forms]![YourForm]![YourTextBox] + 1
    >
    > The form must be open.
    >
    > "DevourU" wrote:
    >
    >> I have a [value] I want to pass on to a query that will select next
    >> [value]
    >> records. Currently this [value] is in a form, but I can pass it on other
    >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I need to
    >> insert a [value], not "N". Help? TIA!
    >>
    >> -JS
    >>
    >>
    >>
     
  5. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    My post was not SQL but was query grid criteria. It would be in the WHERE
    statement of the SQL.

    WHERE [YourField] = [Forms]![YourForm]![YourTextBox] + 1

    "DevourU" wrote:

    > Thankx for the reply. Do you mean SELECT TOP
    > [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.
    >
    > -JS
    >
    > "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    > news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    > > Use the data from the form as criteria like --
    > > [Forms]![YourForm]![YourTextBox] + 1
    > >
    > > The form must be open.
    > >
    > > "DevourU" wrote:
    > >
    > >> I have a [value] I want to pass on to a query that will select next
    > >> [value]
    > >> records. Currently this [value] is in a form, but I can pass it on other
    > >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I need to
    > >> insert a [value], not "N". Help? TIA!
    > >>
    > >> -JS
    > >>
    > >>
    > >>

    >
    >
    >
     
  6. DevourU

    DevourU
    Expand Collapse
    Guest

    Again, thanks for following me on this. I want to select a number of records
    with a query. Let's say the first 5 listed, or the first 7 listed. I have no
    [YourField] to use +1 with. CLear as mud? :)

    -JS

    "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    news:35FAEA75-BE89-47AD-84EB-64B192B65F29@microsoft.com...
    > My post was not SQL but was query grid criteria. It would be in the WHERE
    > statement of the SQL.
    >
    > WHERE [YourField] = [Forms]![YourForm]![YourTextBox] + 1
    >
    > "DevourU" wrote:
    >
    >> Thankx for the reply. Do you mean SELECT TOP
    >> [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.
    >>
    >> -JS
    >>
    >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    >> news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    >> > Use the data from the form as criteria like --
    >> > [Forms]![YourForm]![YourTextBox] + 1
    >> >
    >> > The form must be open.
    >> >
    >> > "DevourU" wrote:
    >> >
    >> >> I have a [value] I want to pass on to a query that will select next
    >> >> [value]
    >> >> records. Currently this [value] is in a form, but I can pass it on
    >> >> other
    >> >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I need
    >> >> to
    >> >> insert a [value], not "N". Help? TIA!
    >> >>
    >> >> -JS
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
  7. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    Somehow I thought that you want to increment a value from a field.

    The only way I know how to do the TOP N is to edit the SQL or change the
    number on the icon bar in design view.

    "DevourU" wrote:

    > Again, thanks for following me on this. I want to select a number of records
    > with a query. Let's say the first 5 listed, or the first 7 listed. I have no
    > [YourField] to use +1 with. CLear as mud? :)
    >
    > -JS
    >
    > "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    > news:35FAEA75-BE89-47AD-84EB-64B192B65F29@microsoft.com...
    > > My post was not SQL but was query grid criteria. It would be in the WHERE
    > > statement of the SQL.
    > >
    > > WHERE [YourField] = [Forms]![YourForm]![YourTextBox] + 1
    > >
    > > "DevourU" wrote:
    > >
    > >> Thankx for the reply. Do you mean SELECT TOP
    > >> [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.
    > >>
    > >> -JS
    > >>
    > >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    > >> news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    > >> > Use the data from the form as criteria like --
    > >> > [Forms]![YourForm]![YourTextBox] + 1
    > >> >
    > >> > The form must be open.
    > >> >
    > >> > "DevourU" wrote:
    > >> >
    > >> >> I have a [value] I want to pass on to a query that will select next
    > >> >> [value]
    > >> >> records. Currently this [value] is in a form, but I can pass it on
    > >> >> other
    > >> >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I need
    > >> >> to
    > >> >> insert a [value], not "N". Help? TIA!
    > >> >>
    > >> >> -JS
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
  8. DevourU

    DevourU
    Expand Collapse
    Guest

    I was using SELECT TOP 10 as an example. Is it possible to limit a query to
    X records?

    -JS

    "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    news:F5EA506F-2403-4828-BF92-0A499A03E95C@microsoft.com...
    > Somehow I thought that you want to increment a value from a field.
    >
    > The only way I know how to do the TOP N is to edit the SQL or change the
    > number on the icon bar in design view.
    >
    > "DevourU" wrote:
    >
    >> Again, thanks for following me on this. I want to select a number of
    >> records
    >> with a query. Let's say the first 5 listed, or the first 7 listed. I have
    >> no
    >> [YourField] to use +1 with. CLear as mud? :)
    >>
    >> -JS
    >>
    >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    >> news:35FAEA75-BE89-47AD-84EB-64B192B65F29@microsoft.com...
    >> > My post was not SQL but was query grid criteria. It would be in the
    >> > WHERE
    >> > statement of the SQL.
    >> >
    >> > WHERE [YourField] = [Forms]![YourForm]![YourTextBox] + 1
    >> >
    >> > "DevourU" wrote:
    >> >
    >> >> Thankx for the reply. Do you mean SELECT TOP
    >> >> [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.
    >> >>
    >> >> -JS
    >> >>
    >> >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    >> >> news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    >> >> > Use the data from the form as criteria like --
    >> >> > [Forms]![YourForm]![YourTextBox] + 1
    >> >> >
    >> >> > The form must be open.
    >> >> >
    >> >> > "DevourU" wrote:
    >> >> >
    >> >> >> I have a [value] I want to pass on to a query that will select next
    >> >> >> [value]
    >> >> >> records. Currently this [value] is in a form, but I can pass it on
    >> >> >> other
    >> >> >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I
    >> >> >> need
    >> >> >> to
    >> >> >> insert a [value], not "N". Help? TIA!
    >> >> >>
    >> >> >> -JS
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
  9. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    I thought that you wanted the ability to enter the number of records required
    on the fly such as responding to a prompt. If this is not what you are
    asking then please reword your request so that I may understand your request.

    "DevourU" wrote:

    > I was using SELECT TOP 10 as an example. Is it possible to limit a query to
    > X records?
    >
    > -JS
    >
    > "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    > news:F5EA506F-2403-4828-BF92-0A499A03E95C@microsoft.com...
    > > Somehow I thought that you want to increment a value from a field.
    > >
    > > The only way I know how to do the TOP N is to edit the SQL or change the
    > > number on the icon bar in design view.
    > >
    > > "DevourU" wrote:
    > >
    > >> Again, thanks for following me on this. I want to select a number of
    > >> records
    > >> with a query. Let's say the first 5 listed, or the first 7 listed. I have
    > >> no
    > >> [YourField] to use +1 with. CLear as mud? :)
    > >>
    > >> -JS
    > >>
    > >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    > >> news:35FAEA75-BE89-47AD-84EB-64B192B65F29@microsoft.com...
    > >> > My post was not SQL but was query grid criteria. It would be in the
    > >> > WHERE
    > >> > statement of the SQL.
    > >> >
    > >> > WHERE [YourField] = [Forms]![YourForm]![YourTextBox] + 1
    > >> >
    > >> > "DevourU" wrote:
    > >> >
    > >> >> Thankx for the reply. Do you mean SELECT TOP
    > >> >> [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.
    > >> >>
    > >> >> -JS
    > >> >>
    > >> >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    > >> >> news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    > >> >> > Use the data from the form as criteria like --
    > >> >> > [Forms]![YourForm]![YourTextBox] + 1
    > >> >> >
    > >> >> > The form must be open.
    > >> >> >
    > >> >> > "DevourU" wrote:
    > >> >> >
    > >> >> >> I have a [value] I want to pass on to a query that will select next
    > >> >> >> [value]
    > >> >> >> records. Currently this [value] is in a form, but I can pass it on
    > >> >> >> other
    > >> >> >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but I
    > >> >> >> need
    > >> >> >> to
    > >> >> >> insert a [value], not "N". Help? TIA!
    > >> >> >>
    > >> >> >> -JS
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
  10. DevourU

    DevourU
    Expand Collapse
    Guest

    The application for this is to select a qty of parts from a query to be
    counted every day. 4,7,12, whatever. The number changes. TOP is static, and
    I need to limit the query return to only X records. Like reaching into a
    candy jar, and pulling out only 6 pieces. The parts are listed in descending
    cost. I also do not have a uniqueID, the parts are from a make table which
    is new every day. I could do a table append if uniqueID id required.

    TIA, Ya working today?

    "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    news:F874E387-1799-4FDB-B5CE-97ED3CCF1C9B@microsoft.com...
    >I thought that you wanted the ability to enter the number of records
    >required
    > on the fly such as responding to a prompt. If this is not what you are
    > asking then please reword your request so that I may understand your
    > request.
    >
    > "DevourU" wrote:
    >
    >> I was using SELECT TOP 10 as an example. Is it possible to limit a query
    >> to
    >> X records?
    >>
    >> -JS
    >>
    >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    >> news:F5EA506F-2403-4828-BF92-0A499A03E95C@microsoft.com...
    >> > Somehow I thought that you want to increment a value from a field.
    >> >
    >> > The only way I know how to do the TOP N is to edit the SQL or change
    >> > the
    >> > number on the icon bar in design view.
    >> >
    >> > "DevourU" wrote:
    >> >
    >> >> Again, thanks for following me on this. I want to select a number of
    >> >> records
    >> >> with a query. Let's say the first 5 listed, or the first 7 listed. I
    >> >> have
    >> >> no
    >> >> [YourField] to use +1 with. CLear as mud? :)
    >> >>
    >> >> -JS
    >> >>
    >> >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    >> >> news:35FAEA75-BE89-47AD-84EB-64B192B65F29@microsoft.com...
    >> >> > My post was not SQL but was query grid criteria. It would be in the
    >> >> > WHERE
    >> >> > statement of the SQL.
    >> >> >
    >> >> > WHERE [YourField] = [Forms]![YourForm]![YourTextBox] + 1
    >> >> >
    >> >> > "DevourU" wrote:
    >> >> >
    >> >> >> Thankx for the reply. Do you mean SELECT TOP
    >> >> >> [Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.
    >> >> >>
    >> >> >> -JS
    >> >> >>
    >> >> >> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    >> >> >> news:4951C8CB-98DA-4CE6-850D-0C784C4B15E9@microsoft.com...
    >> >> >> > Use the data from the form as criteria like --
    >> >> >> > [Forms]![YourForm]![YourTextBox] + 1
    >> >> >> >
    >> >> >> > The form must be open.
    >> >> >> >
    >> >> >> > "DevourU" wrote:
    >> >> >> >
    >> >> >> >> I have a [value] I want to pass on to a query that will select
    >> >> >> >> next
    >> >> >> >> [value]
    >> >> >> >> records. Currently this [value] is in a form, but I can pass it
    >> >> >> >> on
    >> >> >> >> other
    >> >> >> >> ways if needed. Can I use LIMIT? SELECT TOP "N" works fine, but
    >> >> >> >> I
    >> >> >> >> need
    >> >> >> >> to
    >> >> >> >> insert a [value], not "N". Help? TIA!
    >> >> >> >>
    >> >> >> >> -JS
    >> >> >> >>
    >> >> >> >>
    >> >> >> >>
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     

Share This Page