By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,139 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,139 IT Pros & Developers. It's quick & easy.

Help Needed to Create Special Records

P: n/a

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.


Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.