How to Select next [value] records?

D

DevourU

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
 
G

Guest

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

The form must be open.
 
D

DevourU

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

-JS

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

The form must be open.

DevourU said:
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
 
G

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 said:
Thankx for the reply. Do you mean SELECT TOP
[Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.

-JS

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

The form must be open.

DevourU said:
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
 
D

DevourU

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 said:
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 said:
Thankx for the reply. Do you mean SELECT TOP
[Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.

-JS

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

The form must be open.

:

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
 
G

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 said:
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 said:
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 said:
Thankx for the reply. Do you mean SELECT TOP
[Forms]![YourForm]![YourTextBox] + 1? I get a SQL statement error.

-JS

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

The form must be open.

:

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
 
D

DevourU

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

-JS

KARL DEWEY said:
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 said:
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 said:
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

:

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

-JS

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

The form must be open.

:

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
 
G

Guest

I thought that you wanted the ability to enter the number of records required
I was using SELECT TOP 10 as an example. Is it possible to limit a query to
X records?

-JS

KARL DEWEY said:
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 said:
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

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

:

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

-JS

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

The form must be open.

:

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
 
D

DevourU

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 said:
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 said:
I was using SELECT TOP 10 as an example. Is it possible to limit a query
to
X records?

-JS

KARL DEWEY said:
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.

:

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

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

:

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

-JS

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

The form must be open.

:

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
 

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