Have a user imput the number of records a query returns

  • Thread starter Thread starter thudson
  • Start date Start date
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).
 
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.
 
Back
Top