Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Working with report in access

Author  Topic 

ntn104
Posting Yak Master

175 Posts

Posted - 2008-08-25 : 21:35:09
Hi,
1)I have run a report in MS-Access, about 5000 letters. I would like to print 100 letters every 3 weeks in sequence order. How would I do that to make sure I won't be duplicated for next printing.

Please help me to find out the way to do it....thanks,

georgev
Posting Yak Master

122 Posts

Posted - 2008-08-26 : 12:07:12
You'll have to mark the letters as printed; i.e. you alter your table structure to include a date_printed (datetime field) or similar which you can update on printing.

You can then use a query to select the next 300 for printing
[CODE]
SELECT TOP 300 *
FROM my_table
WHERE date_printed IS NULL
ORDER
BY some_sequence_number
[/CODE]


George
Go to Top of Page

ntn104
Posting Yak Master

175 Posts

Posted - 2008-08-27 : 14:04:58
quote:
Originally posted by georgev

You'll have to mark the letters as printed; i.e. you alter your table structure to include a date_printed (datetime field) or similar which you can update on printing.

You can then use a query to select the next 300 for printing
[CODE]
SELECT TOP 300 *
FROM my_table
WHERE date_printed IS NULL
ORDER
BY some_sequence_number
[/CODE]


George



Thank you for your help! This is work very well.
There is another way in MS-Access: I make a new query and select the "TOP VALUE" drop down box on toolbar, and assign a Null value for Letterdate...so it works the same as your code.

Again, thanks very much!
Go to Top of Page
   

- Advertisement -