473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Getting a Constant Number of Records from a Query

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
3 1333
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sondra Wilson | last post by:
I have created a sorted query. The total(records) I get in the query is correct. My problem lies with getting that total into my report. I use count to insert the total number of records in my...
4
by: Chris Tremblay | last post by:
I am trying to figure out how to go about retrieving the number of results returned from my queries in SQL server from VB.NET without using a the Select Count(*) query. The method that I was using...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
8
by: King | last post by:
Hi I have following MS Acess query Here is the query ID Name Prgm ID Client ID Date Start Time End Time Minutes C4 Trisha TIP DEK0703 7 /7 /2006...
12
by: Lennart Anderson | last post by:
I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
0
by: peter.c.bradley | last post by:
Hi folks, I have an Access report that has an unbound text box in the details section. The report also includes the standard headers and footers. The details section is populated by a query...
11
by: Armin Zingler | last post by:
"Bill Schanks" <wschanks@gmail.comschrieb Try to execute lvMembers.beginupdate before filling and lvMembers.endupdate
5
by: slickdock | last post by:
I need to break my query into 3 groups: First 60 records (records 1-60) Next 60 records (records 61-121) Next 60 records (records 122-182) Of course I could use top values 60 for the first...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.