Query on name and relevant department

hunoob

Registered User.
Local time
Yesterday, 23:55
Joined
Feb 17, 2009
Messages
90
Hi Everyone! I am pretty sure that my problem is very basic, and probably it is about connecting tables the right way, however the end result I would like to see it in a query.
So here is my problem which is driving me mad. I have two tables: one contains the risks and the riskowners, the other the names and departments.
In the risk table I have set the riskowners field as a query which concatenates the first and last name from the names table. This way the input in the table is very easy. But because of this, I have a problem when trying to make a report query because in the query I would like to have the risk topic, risk owner name and the relevant department.
How can I connect my risk owner field (which is a concatenating query) to the names table fields? I spent already hours figuring out what to do....but no luck at all... :(
You can find the attached file, to see clearly what I am talking about.
Thank you in advance for your help!
 

Attachments

In the risk table I have set the riskowners field as a query which concatenates the first and last name from the names table.

That's not how to do it. First, you should rename the two [Azonosító] fields in your database better--prefix them with the data they are for (i.e. Name_Azonosító, Risk_Azonosító). Then you should not store the name in tbl_Risks, but the [Azonosító] field from tbl_Names in the tbl_Risks, that's called a foreign key (http://en.wikipedia.org/wiki/Foreign_key). Then in your query you link those two tables by the Azonosító field in tbl_Names.
 
Hi plog!

Thank you for your reply. I will try to change it, however I do not know how will I be able to input the names if I can see only a the Name_Azonosito id number. :(
 
Run qry_Mihail

Note please:
1) that I (re)design your database.
2) You MUST create forms for your database. DO NOT work at table level.
 

Attachments

Hi Mihail!

Thank you for your reply. I will remake my database structure.
 

Users who are viewing this thread

Back
Top Bottom