Help with my table please

  • Thread starter Thread starter saffron
  • Start date Start date
S

saffron

I have a table that list values with names i.e.

Fred Cheese
Fred Ham
Dave Cheese
Sam Ham
Sam Tuna

I want it to read

Fred Cheese Ham
Dave Cheese
Sam Ham Tuna

I'm sure there is a really easy way of doing this but can't work it
out... can anyone help?
 
The way to do this is with two tables, one for names and the other for
sandwich fillings.

tblPeople
PeopleID (primary key, or PK)
FirstName
LastName
Other information specific to the person

tblFillings
FillingID (PK)
PeopleID (foreign key, or FK)
FillingDescription

Create a relationship between the two PeopleID fields. To enter the data,
use a form/subform; the form is based on tblPeople, and the subform on
tblFillings. To view the data, you could use a report grouped by People.
 
Hi

You are maybe confusing accessw ith other prgrammes. Access is a relational
database and so you should not store your data like this
Fred Cheese
Fred Ham
Dave Cheese
Sam Ham
Sam Tuna

What you need are 2 tables. The first to store personal information.
tblPersonalDetails
PersonalID
1stName
Surname
Address
etc
etc

The second table will have a,inking field (linking back to tblPersonalDetails)
It may look something like this
tblFood
FoodID
PersonalID (this is the linking field)
FoodType
etc
etc

Next create a query and bring noth the tables into this.
Select Totals from the query type drop down and group by PersonalID and you
will have this list as you need. You can create froms and reports to display
the information as you need.

Hope this helps
 
Or, a simple crosstab query might give you what you want.
 
I thought of that, but that would give something like a table that had
fields of

Name
Cheese
Ham
Tuna

and resulted in

Name Cheese Ham Tuna
Fred 1 1
Dave 1
Sam 1 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top