J
John Spencer
Received the copy of the database and proposed the following changes.
Quick look.
Tbl_TrainingRecs.JobID should NOT be an autonumber field. It should be a
number field with field Size set to LONG and NO default value.
The combobox on TrainingRecs Subform2 should be bound to the JobID field and
should have
Row source: SELECT JobID, Job FROM tbl_Jobs ORDER BY Job
Column Count: 2
Column Widths: 0
The subform2 should have a record source of
SELECT tbl_TrainingRecs.EmployeeID, tbl_TrainingRecs.Training,
tbl_TrainingRecs.JobID
FROM tbl_TrainingRecs;
After fixing the data I’ve set up the relationships so that you cannot add a
trainingRec without having a corresponding record in both tbl_Jobs and
tbl_Employees. You also cannot delete a record from either of those tables if
there is a trainingRec using that value.
John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
Quick look.
Tbl_TrainingRecs.JobID should NOT be an autonumber field. It should be a
number field with field Size set to LONG and NO default value.
The combobox on TrainingRecs Subform2 should be bound to the JobID field and
should have
Row source: SELECT JobID, Job FROM tbl_Jobs ORDER BY Job
Column Count: 2
Column Widths: 0
The subform2 should have a record source of
SELECT tbl_TrainingRecs.EmployeeID, tbl_TrainingRecs.Training,
tbl_TrainingRecs.JobID
FROM tbl_TrainingRecs;
After fixing the data I’ve set up the relationships so that you cannot add a
trainingRec without having a corresponding record in both tbl_Jobs and
tbl_Employees. You also cannot delete a record from either of those tables if
there is a trainingRec using that value.
John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
John said:Ok, something is wrong here and it is probably data related, but I can't
tell what is happening. As a guess the values in the linking fields are
not being set correctly.
Can you compact the database and zip it? And can you send me a copy?
If so, my email is
j Spencer <AT> hilltop. EWE EM BEE SEE <Dot> EDU
To make that a valid address remove the spaces, change the the words to
letters or the appropriate characters.
John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
Yes there are some records returned but these are records which were
in the
tables from 2 or 3 days ago. If i add new records now, using the data
entry
form created yesterday, they will go into the correct tables but will
not be
picked up by the select query (the query at the moment is set to
return all
records...no criteria are set yet)
The 3 tables used in the query are Employees
Jobs
TrainingRecs
The fields added to the grid are
EmployeeName
EmployeeID
Manager
DateStarted
CurrentDept
(All above from the Employees table)
And also...
Training
Job
(Above fields from the TrainingRecs table)
The Data Entry property on the form is set to NO
Thanks,
Jen
John said:Let me understand this.
If you run the query (by itself) you are not getting any records
returned. True or False?
If you are not getting any records returned and no error message,
then we need to look at the table structure and make sure that the
correct values and correct value types are being entered.
If you are getting records returned when you run the query, then we
need to look at where you are using the query. One thing to check is
the form's properties - the Data Entry property should be set to NO.
If it is set to YES then the form will not show existing records when
it is opened. It will only show new records added while the form
remains open.
John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
Cheers for all your help to date John... i think i'm almost there.
There's
one strange thing happening at the moment. When i use the data entry
form to
[quoted text clipped - 14 lines]
Thanks for your patience,