By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,445 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

Getting a Constant Number of Records from a Query

P: n/a
I am creating an equipment tracking database, and found myself in need
of a way to always return a set number of rows from a database, even
when fewer results are found. I'll explain.

One of the forms I need to output to (and I've already designed as a
report) has 11 rows that can be output to (I don't know why 11, I would
have done 10). This form is a receipt for items checked out, such as
notebook computers.

Normally, I only check out one or two items at a time (such as a
notebook computer and LCD projects). But the form still needs to have
all 11 rows, regardless.

Is there a way to force the resultset that creates the form to return
blank rows to fill in the rest of the form (report)?

Jason

May 18 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 18 May 2006 08:24:17 -0700, "DartmanX" <fe***********@gmail.com>
wrote:

I'll add this to my list of weird requirements.
You could perhaps do this by having a table with 11 rows in it, and
outer-joining with it.

-Tom.

I am creating an equipment tracking database, and found myself in need
of a way to always return a set number of rows from a database, even
when fewer results are found. I'll explain.

One of the forms I need to output to (and I've already designed as a
report) has 11 rows that can be output to (I don't know why 11, I would
have done 10). This form is a receipt for items checked out, such as
notebook computers.

Normally, I only check out one or two items at a time (such as a
notebook computer and LCD projects). But the form still needs to have
all 11 rows, regardless.

Is there a way to force the resultset that creates the form to return
blank rows to fill in the rest of the form (report)?

Jason


May 19 '06 #2

P: n/a
sounds clutsy but.

create report detail table with key

empty table
Append 11 blank records

append the real records

create query to retreave top 11 records from query that is sorted
descending on Key on that table.

May 19 '06 #3

P: n/a
rkc
DartmanX wrote:
I am creating an equipment tracking database, and found myself in need
of a way to always return a set number of rows from a database, even
when fewer results are found. I'll explain.


How is the 11 row requirement of the form enforced?
May 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.