problem not sure howto describe ^^

butter30

Registered User.
Local time
Today, 19:32
Joined
Jan 24, 2010
Messages
12
here are the tables involved and their fields

(client)
-email address (PK)
-clients details i.e. post code and address

(booking)
-customer ID (PK) autonumber
-product
-quantity
-price

(booking link)
-customer ID (PK)
-email address

relationships
(booking link)'s customer ID has relationship link to (booking)'s customer ID
(booking link)'s email address has relationship link to (client)'s email addess

The problem

"this is theortical couldnt create form read sidenote"
I create a form with following fields

email address (booking link)
product (booking)
quantity (booking)
price (booking)

when user clicks add new record

i want the autonumber created from (booking) table also go to (booking link) table along with email address

side note
i tried to create a form doing this but it keeps saying specify relationship when trying to add email address from (booking link) to form
 
When modelling a 1-to-many relationship you store the PK of the parent record in the Child record as a Foreign Key(FK). If the PK is of type Autonumber then the FK should be Long Integer. Otherwise both keys should have the same type.
 
sorry i dont understand what you mean i changed the (booking link) to number and long intergal but still doesnt work
 
can you give example with reference to system plz

im a beginner at access
 
Look at your design. You don't have any FK in your child tables. It would help if you could tell us what relationships you really have
 
Why 1 to 1 relationship? there is very rarely a good reason for 1 to 1 so I would be interested to now why you need to do it this way.
Looking at your table names I would have thaought 1 client could make more than 1 booking. And why isn't the clients email address stored in the client record?
 
here are the tables involved and their fields

(client)
-email address (PK)
-clients details i.e. post code and address

(booking)
-customer ID (PK) autonumber
-product
-quantity
-price

(booking link)
-customer ID (PK)
-email address

relationships
(booking link)'s customer ID has relationship link to (booking)'s customer ID
(booking link)'s email address has relationship link to (client)'s email addess

The problem

"this is theortical couldnt create form read sidenote"
I create a form with following fields

email address (booking link)
product (booking)
quantity (booking)
price (booking)

when user clicks add new record

i want the autonumber created from (booking) table also go to (booking link) table along with email address

side note
i tried to create a form doing this but it keeps saying specify relationship when trying to add email address from (booking link) to form


As Rabbie has pointed out you should have foreign keys in your child tables (booking and linking). You need to sort our table design before you consider building your form. Do a search on foreign keys to get yourself acquainted. Then go about designing your tables with the following structure in mind:

(client)
-ClientID (PK)
-email address (PK)
-clients details i.e. post code and address

(booking)
-bookingID (PK) autonumber
-customerID_FK (FK) in this table linked to ClientID in Client table
-product
-quantity
-price

With this structure you don't need a "booking link" table because the customerID_FK field will be looking up data from your Client table which would contain the customer's personal details.

Hope this helps.
 
the tables i show are 3rd normalisation form, Arent the relatonship between 3nf tables always 1 to 1?

thanks guy for helping im a newb when it comes to access ^^
 
the tables i show are 3rd normalisation form, Arent the relatonship between 3nf tables always 1 to 1?

thanks guy for helping im a newb when it comes to access ^^


Normalization isn't about reaching 3nf, it can go beyond that. You should read it up again and understand before considering creating your tables in Access.

Maybe Rabbie has a link that could explain this?
 
btw is one to one relationship the 1 and 00 sybmol that show in relationship?
 
i was looking oer my normalisation notes and i feel kinda stupid now

is this just meant torepresent a relationship link and not a table?

booking link)
-customer ID (PK)
-email address
 
i was looking oer my normalisation notes and i feel kinda stupid now

is this just meant torepresent a relationship link and not a table?

booking link)
-customer ID (PK)
-email address

If you follow the table definitions I provided you will find that there's no bookings link table there, just to reiterate. You listed Booking Link as a table in your previous post.

For you to create the FK's, select "Lookup Wizard..." under Data Type and follow the instructions on screen.
 
A customer can have MANY bookings. 1 - to - Many
A booking cannot have MANY customers (in your situation).
 
i was looking oer my normalisation notes and i feel kinda stupid now

is this just meant torepresent a relationship link and not a table?

booking link)
-customer ID (PK)
-email address
Don't feel too stupid. We all have to learn at the beginning
 

Users who are viewing this thread

Back
Top Bottom