linking key field, producing query with linked tables, produce report

  • Thread starter Thread starter Mouse
  • Start date Start date
M

Mouse

Guest
i am doing a module that means i have to use access. i was doing ok up until this bit:
i'll write as iv been given it, even though you wont know what tables etc its on about.

1) look at the garages database table. there is a one to many relationshihp between the garages table and the cars table. each table has a 15 character field SPARES which can be used as the linking key field to link the tables together. in the garages table, which is on the 'one' side of the relationship, this field must be the first field, it must be different for each record, and must be explicitly designated as a key field. the tables should then be linked using this field.

im not sure what keyfield is? and how do i link them?

2) produce a query to view the make, colour, cosr, spares and representative for all cars costing over £6,000. produce and print a tabular report on this query.

the problem with this is that one field is from a different table...and because i dont know how to do part one....i cant do part 2


3) produce a query to view all the record from both tables, then produce a columnar form using this query. it should view the data by cars.

i think this bit is easy enough once iv done the other parts, but yea i cant!


so any help would be greatly appreciated, thankyou!!

mouse
 
1 Check your garages table in design view to determine if the SPARES field is marked as a key field. A little key will be next to the field name if it is.

2 If it is not marked as a key field, highlight the field and press the little key on the menu bar at the top of the screen. That will make it a key field. Save your changes.

3 Check your cars table to make sure that it has a SPARES field. If it does not, add one. Click insert row from the menu bar, type spares in the first cell, and text in the data type cell. Check the form at the bottom to ensure that the field includes at least 15 characters. If not, make changes, DO NOT MAKE IT A KEY FIELD. Save table changes.

4 Go to queries, query wizard, follow the instructions to enter both tables, and the fields you want in the query, click next, detail view, Next, modify query, click finish. When the query shows up, the two tables should be connected, and contain the fields you need, in design view.

5 In the criteria cell of the cost field (assuming that is the name of the field) enter >6000.

6 On the bottom of each field is a check box. All fields with a check will show in your query results. those without a check will not show. Just click the box to remove the check, if you do not need them to show.

7 Click on the exclamation point on the menu bar on top of the query to run the query.

If that works for you, let me know how you make out, and we can take the next steps.

rbrule
 
1 Check your garages table in design view to determine if the spares field is marked as a key field. A little key will be next to the field name if it is.

2 If it is not marked as a key field, highlight the field and press the little key on the menu bar at the top of the screen. That will make it a key field. Save your changes.

3 Check your cars table to make sure that it has a spares field. If it does not, add one. Click insert row from the menu bar, type spares in the first cell, and text in the data type cell. Check the form at the bottom to ensure that the field includes at least 15 characters. If not, make changes. Save table changes.

4 Go to queries, query wizard, follow the instructions to enter both tables, and the fields you want in the query, click next, detail view, Next, modify query, click finish. When the query shows up, the two tables should be connected, and contain the fields you need, in design view.

5 In the criteria cell of the cost field (assuming that is the name of the field) enter >6000.

6 On the bottom of each field is a check box. All fields with a check will show in your query results. those without a check will not show. Just click the box to remove the check, if you do not need them to show.

7 Click on the exclamation point on the menu bar on top of the query to run the query.

If that works for you, let me know how you make out, and we can take the next steps.

rbrule
 
thanks for your help.

i started the query wizard (this is the main bit i got stuck on in the frist place) i put across the fields from the cars table, then the ones from the garage table. it says they arent linked so i cant go on with the query?
 
I managed to complete the rest of the assignment :)
Thankyou so much for all your help!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom