how to change the source of a colom

  • Thread starter Thread starter kasper
  • Start date Start date
K

kasper

Guest
hi there first to start of im dutch so chances are you wont understand everything of what im saying;).

For an assignment for school i have too make an acces database.
im doing pretty fine except a couple of things. the assignment is too make an database for a hotel.
i made 3 tables 1 for customer data 1 for the booking 1 for the appartment data.
now im making a booking form.
but i ran in to this problem: the customer data table has customer number as main key. if i make a form all the coloms customername, customer adress, customer streetname, ect get their data from looking up what the customer number is and then getting it from the right colum.
but on the booking form i need to have the data for the companions who are staying at the hotel with the customer too.
the companion has the same coloms as the customer the companions are staying at the hotel too they too are registert in the customer table.
but if i try to copy the customer coloms like customername, customer adress , i dont know how too make it that they look up the companion number and not the customer number.

thanks in advance for the reply's, if anything is unclear please say so
kasper
 
Make a table called "companions". This can be the child table to the customer table. Make a relationship between them.

for example, If the customer_id 3 (thisi s your primary key, indexed, no duplicates), then there should be a column in the companions table called custid. Make a one to many relation ship btween the customer id from your customers table and custid in your companions table. If there are 2 people staying in the hotel then their custid would be 3. If you need help, you can post your database and we'll take a look at it.

good luck
Bones
 
hi there again thanks very much for the quick reply:). i tried too do what you said but i didnt do it proparly i think.
so i've attached another database in english with all the essential info so its easyer for you too help. now im working on the relations but that where i need help i see hehe.
thanks in advance again
kasper
 

Attachments

Users who are viewing this thread

Back
Top Bottom