Query Problem

conormooney

Registered User.
Local time
Today, 10:43
Joined
Feb 17, 2004
Messages
35
I have two tables; Tbl_herd Tbl_dams (dams=mother of animals)

tbl_herd(EarTagNumber,Breed,Colour,DOB,Dam's EarTagNumber)
tbl_dams(EarTagNumber,Breed,Colour,DOB)

In my tbl_herd i enter all information regarding a new born animal, this includes its mothers eartag number which i use to identify each animal.
Also each Dam also has a record in the tbl_herd.
I want a query which i will run whenever i enter a new record into tbl_herd that will search through the Dam's field and based on this extract their information and display it in the tbl_dams.
Any ideas
 
Why are you using the dams table at all? All the info is already in the herd table and if every entry in the dams table is also in the herd table you have redundant data.

You simply have to set up a query that looks for the dams tag no in the herds table...
 
Maybe I haven't understood your problem but I think a its just a simply query such as:

SELECT * FROM tbl_dams WHERE tbl_dams.EarTagNumber = [dams ear tag number from input]

??
 

Users who are viewing this thread

Back
Top Bottom