473,388 Members | 1,230 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,388 software developers and data experts.

Indexing a phone book

I'm creating a fairly phone book for an organization (maybe 400 pages).
Members are listed out by chapter with their phone number and all that.
There is also to be an index by last name. In creating the index by last
name, how do I find out what page a person's name is on in the chapter
directory?
Nov 13 '05 #1
2 1452
On Sat, 5 Feb 2005 21:27:24 -0800, "Mike Turco"
<mi*******@yahoo-no-spam-4-me.com> wrote:
I'm creating a fairly phone book for an organization (maybe 400 pages).
Members are listed out by chapter with their phone number and all that.
There is also to be an index by last name. In creating the index by last
name, how do I find out what page a person's name is on in the chapter
directory?


Easy. Put some VBA into the Report (probably on the Format event, but
I can imagine it can put in a number of different places) that writes
what you want to "recall" to a temporary table.

Then use that table as the basis for your index report.

DJ
Nov 13 '05 #2
Mike Turco wrote:
I'm creating a fairly phone book for an organization (maybe 400 pages). Members are listed out by chapter with their phone number and all that. There is also to be an index by last name. In creating the index by last name, how do I find out what page a person's name is on in the chapter directory?


This is probably useless but if the records are the same vertical size
then you could add a rownumber to a query that's the same as the one
used to build the chapter. I came up with a way to add the rownumbers
then googled and saw that many others used the same technique in the
past.

Technique illustrated:
tblInvoices
InvoiceID InvoiceDate SupplierID Data
1 1/1/05 18 Some data
3 1/2/05 23 More data
5 1/3/05 9 Even more data

where InvoiceID is an autonumberfield.

qryInvoices
SELECT InvoiceID, InvoiceDate, SupplierID, Data FROM tblInvoices ORDER
BY InvoiceId;

qryInvoiceWithRecordNumber
SELECT (SELECT Count(A.InvoiceId) + 1 FROM qryInvoices As A WHERE
A.InvoiceID < qryInvoices.InvoiceID) AS RecordNumber,
qryInvoices.InvoiceID, qryInvoices.InvoiceDate, qryInvoices.SupplierID,
qryInvoices.Data FROM qryInvoices;

gives:

RecordNumber InvoiceID Date SupplierID Data
1 1 1/1/05 18 Some data
2 3 1/2/05 23 More data
3 5 1/3/05 9 Even more data
Then you can use (RecordNumber - 1) \ RecordsPerPage + 1 to get what
page they're on.

James A. Fortune

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin Emanuelsson | last post by:
Hello. I have a problem with a small asp-solution that searches for documents with indexing service. For some files in the search result I get "bad text" returned, such as...
8
by: Martin Emanuelsson | last post by:
Hello, I have a problem with a small asp-solution that searches for PDF-documents with indexing service. For some files in the search result I get gibberish returned, such as...
3
by: jliusolar | last post by:
Hi I am trying to figure out why an application get this error when I am trying to open the application's asmx file from localhost. I don't have indexing service running(it set as manual and not...
2
by: Jonathan Raemdonck | last post by:
I have the following situation: I'm developing an reverse geocoder, so input is lat/lon coordinate and output is the nearest textual location. I have a database of +- 2 000 000 records that...
0
by: Egil Helland | last post by:
Hi, I am creating a list of phone numbers, and would like to have a feature similar to the address book in OS X - that is, when you click on a phone number, a semitranclusent, large banner...
7
by: Ryan | last post by:
I have a bit of a problem with regards an indexing strategy. Well, basically there is no indexing strategy on a set of data I have at work. Now, I didn't create the design as I would have allowed...
3
by: webmaster | last post by:
Pardon my not knowing where to find this one... but try finding the meaning of "this" on the net or in reference books. I'm trying to follow this example from Apress book - Introduction to C#...
3
by: neeraj pandey | last post by:
Hi all, I need to implement phone book for WinXp. We have in built APIs for phone book for all windows mobile based OS. How can i implement the same thing for WinXP ?? I need ur...
2
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a server 2008 IIS 7.0 with indexing service installed. I have created the catalog and have a test page using these posts:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.