I am trying to create a query that will show me who is phoning who in an
organisation from available Telephone Billing information. I am creating a
MSAccess 2000 database with a few few tables, two of which are:
TableMembers: (containg fields Refs, DateCreated, MembershipNo,
OfficeLocation ...NB: Refs has a Primary Key - No Duplicates)
TablePeople: (containing fields: Refs, Name, Addr, TelHome, TelWork,
TelMobile & TelFax)
TableTelBills: (containing fields: Refs, TelNo, DateCalled, Duration,
TelType)
I am trying to create a query that will use a simple searching criteria eg.,
Like "*" [Enter the Tel No or part Tel No to search:] & "*"
to search all the Tel fields in the TablePeople and TableTelBills (TelHome,
TelWork, TelMobile, TelFax and TelNo) but am running in difficulties.
I start by creating a query and adding the tables TablePeople and
TableTelBills and TableMembers.
I use the Refs from the Table Members as a base criteria but do not know how
to create criteria that will search all Tel fields at once!
I would appreciate any and all help people!
Jan 3 1779
"Jan Szymczuk" <sz******@btinternet.com> wrote I am trying to create a query that will show me who is phoning who in an organisation from available Telephone Billing information. I am creating a MSAccess 2000 database with a few few tables, two of which are:
TableMembers: (containg fields Refs, DateCreated, MembershipNo, OfficeLocation ...NB: Refs has a Primary Key - No Duplicates) TablePeople: (containing fields: Refs, Name, Addr, TelHome, TelWork, TelMobile & TelFax) TableTelBills: (containing fields: Refs, TelNo, DateCalled, Duration, TelType)
I am trying to create a query that will use a simple searching criteria
eg., Like "*" [Enter the Tel No or part Tel No to search:] & "*"
to search all the Tel fields in the TablePeople and TableTelBills
(TelHome, TelWork, TelMobile, TelFax and TelNo) but am running in difficulties.
I start by creating a query and adding the tables TablePeople and TableTelBills and TableMembers. I use the Refs from the Table Members as a base criteria but do not know
how to create criteria that will search all Tel fields at once!
Create a table, phone, with fields:
phone_id ' primary key, autonumber, Long
phone_number ' text 10 - store only digits, not ()-
phone_type_id ' Long, foreign key to a table of phone types
(home, cell, employer, etc)
phone_member_id ' Long, foreign key to member table (or person table -
not sure what the distinction is)
You can now search for the entire telephone list with one query.
Darryl Kerkeslager
Dear Darryl Kerkeslager
Thanks for your solution, but I already know about placing all the TelNo
fields in one table and running one query to find any particular number
(one field at a time). My pronlem is that as well as each member having
a few main Tel numbers (Home, Work, Mobile and Fax) I have a seperate
table for each member which displays the Tel billing history for the
past month, and this table will have literally hundreds and hundreds of
numbers that each member has phoned. I need to search for the same
number in both tables across multiple fields...
Jan
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Jan Szymczuk" <sz******@btinternet.com> wrote Thanks for your solution, but I already know about placing all the TelNo fields in one table and running one query to find any particular number (one field at a time). My pronlem is that as well as each member having a few main Tel numbers (Home, Work, Mobile and Fax) I have a seperate table for each member which displays the Tel billing history for the past month, and this table will have literally hundreds and hundreds of numbers that each member has phoned. I need to search for the same number in both tables across multiple fields...
I don't see why you have so many tables and so many fields. Each table
should represent a distinct entity - to have one table of phone numbers
called for each member is not only making your task more difficult, it's not
normal(ized). A member is a distinct entity. A member's phone number is a
distinct entity. A phone number called is a distinct entity. Who called
that number is a property of the phone number called, as is the duration of
the call. Once you properly assign the entities to tables, and make the
attributes into fields, the query becomes simple.
Table: phone
phone_id
phone_number
phone_type_id
phone_member_id
Table: call
call_id
call_number
call_member_id
call_duration
I probably shouldn't do SQL off the cuff, but something like:
SELECT phone_member_id, call_member_id
FROM phone INNER JOIN call ON phone.phone_number = call.call_number;
Darryl Kerkeslager This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: JP SIngh |
last post by:
Hi There
I am creating a search page and need help writing the code to build the sql
string.
I have 3 fields on the main page which a user can choose to enter search
terms in any of the 3...
|
by: Jan Szymczuk |
last post by:
I am trying to create a query that will show me who is phoning who in an
organisation from available Telephone Billing information. I am creating a
MSAccess 2000 database with a few few tables, two...
|
by: TH |
last post by:
I am (still :) working on a recipe database. Now I am trying to figure out
how to set it up for an ingredient search. What I want it to be able to do
is three things:
1. Search based on just...
|
by: TH |
last post by:
I am (still :) working on a recipe database. Now I am trying to figure out
how to set it up for an ingredient search. What I want it to be able to do
is to search by one ingredient, sometimes by...
|
by: Gobi |
last post by:
Hello, I have a Database with lists of Clients in each.
Every year a new tables is created with the naming convention
"CloseYear"
ie close1999, close2000
There are tables from this year back to...
|
by: Steph |
last post by:
Hi.
I'm very new to MS Access and have been presented with an Access database
of contacts by my employer.
I am trying to redesign the main form of the database so that a button
entitled...
|
by: Richard Rosser |
last post by:
Greetings.
Not being used to Access, I have built a search form
using the wizard but am not getting the desired results.
Have tried both the 'and' and the 'or' operator but
neither help.
What I...
|
by: DWolff |
last post by:
I'm somewhat new to Access, and have no VB experience at all (except for modifying existing code where obvious).
I built a data entry form that works fine. Typically, a client will call in and...
|
by: IP This |
last post by:
Good Day Good People...
I have a table with various fields, a number of fields relate to the same data type, i.e. Language1, Language2, Language3, Language4, - I want to be able to search all of...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |