Have a user imput the number of records a query returns

T

thudson

I would like to ask a user to enter information (a work order number eg
12345). I then want the user to enter the number of records that the query
will return (Say 12). I would like the output of the query to have every row
with the same information with the number of rows being what the user entered
(for the above example, the query would return 12 rows with 12345 as the work
order number).
 
K

KARL DEWEY

Adapt this to include your table.
Create a table named CountNumber with field named CountNUM containing number
from 0 (zero) through your maximum spread.
INSERT INTO YourTable ( SN )
SELECT [Enter Starting Serial #]+[CountNUM] AS Expr1
FROM CountNumber
WHERE (((CountNumber.CountNUM)<=[Enter qunaity of records]-1));

Reference the textboxes on the form instead of [Enter Starting Serial #]
and [Enter qunaity of records] to enter data from form.
 

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