Report Criteria

A

Abdul Shakeel

Hi All,

I ve a table name tbl_input containes fields:
InputID, Name, address, age, Nos_of_share_alloted, share_no_from, share_no_to

If a recors is
InputID = 1
Name = ABC
address = XYZ
age = 30
Nos_of_share_alloted = 5000
share_no_from = 1
share_no_to = 5000

Could I view this record in query or on a report in multiples of
share_no_from, share_no_to means the record remain the same on table but in
query or on report it broke up in multiples such as 1 to 500, 501 to 1000,
1001 to 1500 & so on
 
K

KARL DEWEY

Create a table CountNUM with field named CountNumber containing numbers from
1 to your maximum number of output records.
Use this query --
SELECT tbl_input.InputID, tbl_input.Name, tbl_input.address, tbl_input.age,
([share_no_from]+[CountNUM]*[Input block size])-[Input block size] AS
Share_From, [CountNUM]*[Input block size] AS Share_To
FROM tbl_input, CountNumber
WHERE ((([CountNUM]*[Input block size])<=[Nos_of_share_alloted]));
 
A

Abdul Shakeel

Dear Dewey,

Thanks for your response, I enter values in table CountNumber which is 1 to
10 & when I run the query if I enter count num 1 & block size 500 it shows
ten records which all contains the same share_no_from & sahre_no_to values
which is 1 to 500 but I want it should be 1 to 500 on first record 501 to
1000 on second record & so on....
my nos_of_share_allotted was 5000

KARL DEWEY said:
Create a table CountNUM with field named CountNumber containing numbers from
1 to your maximum number of output records.
Use this query --
SELECT tbl_input.InputID, tbl_input.Name, tbl_input.address, tbl_input.age,
([share_no_from]+[CountNUM]*[Input block size])-[Input block size] AS
Share_From, [CountNUM]*[Input block size] AS Share_To
FROM tbl_input, CountNumber
WHERE ((([CountNUM]*[Input block size])<=[Nos_of_share_alloted]));

--
KARL DEWEY
Build a little - Test a little


Abdul Shakeel said:
Hi All,

I ve a table name tbl_input containes fields:
InputID, Name, address, age, Nos_of_share_alloted, share_no_from, share_no_to

If a recors is
InputID = 1
Name = ABC
address = XYZ
age = 30
Nos_of_share_alloted = 5000
share_no_from = 1
share_no_to = 5000

Could I view this record in query or on a report in multiples of
share_no_from, share_no_to means the record remain the same on table but in
query or on report it broke up in multiples such as 1 to 500, 501 to 1000,
1001 to 1500 & so on
 

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