View Full Version : The right way and the wrong way


ianbuswell
02-15-2005, 07:31 AM
Hi guys,

First of all let me apologise if i have posted this in the wrong forum, I think a query is what i need but i'm not 100% sure.

Anyway down to the problem. I have created a customer contact database which contains 4 fields (containing months of the year). These will be used to show when contact is to be made with each customer. Obviously the months will vary from customer to customer, and some customers may only be contacted once in the year, some more - up to a maximum of four. Each field has a drop down box to let you select the correct month.

What i am looking for is a way of showing which customers have an entry for say March. The problem i have found is that March may appear for one customer in the first of the 4 fields and for another in the second etc.

Do i use a query for this??

Any help would be appreciated, Cheers

ColinEssex
02-15-2005, 07:36 AM
You need one table for customer demographic data including a CustomerID (AutoNumber) field.

You need another table for Contacts with the fields

CustomerID
ContactMonth

Col

ianbuswell
02-15-2005, 07:40 AM
Showing my ignorance and complete lack of access knowledge - but how would that help/work? surely i would end up with the same problem

Mile-O
02-15-2005, 08:04 AM
As Colin has said, your table is not normalised (in fact, it doesn't even meet the first specification of database design, namely First Normal Form)

Storing month only isn't a good method either as what happens when you have customers for a number of years? That's right, your query based n March will return records for every March.

Have a look at this example to show you how it is properly done.

ColinEssex
02-15-2005, 08:14 AM
You beat me to it Mile-O ;)

I was going to go on to say that if you store an actual contact date you can then use a criteria in the query to pull out all those for March this year (or whatever year)

Col

Mile-O
02-15-2005, 08:20 AM
You beat me to it Mile-O ;)

I had youth on my side. :cool:

Rich
02-15-2005, 01:05 PM
I had youth on my side. :cool:
Was he looking over your shoulder? :cool: