Help Needed to Create Special Records -
08-10-2004
, 11:04 AM
Dear comp.databases.ms-access,
I have the following tables:
tblStaff (Name PK)
tblStaffHours(Name PK, Date PK, field1, field2)
I want to create records in tblStaffHours when a given button on a
form is pressed.
Records should be added so that for a supplied date (this comes from
text box on the form) every staff member has an entry. For example,
tblStaffContains Mike, Tom, Harry. The date is 4th of August and the
button is pressed. The following records should be added:
Mike, 4th August 2004
Tom, 4th August 2004
Harry, 4th August 2004
(Field1, field2 should be left blank)
Cam someone help me to achieve this please? Is it possible with SQL?
To complicate things further, I require that no records are
overwritten. In the above example, if Tom already has an entry for 4th
August 2004 then this record should be kept safe and another should
not be added (i.e. the data in the record should not be overwritten)
Thank you for your help, it is very much appreciated.
Regards,
Cro |