dbTalk Databases Forums  

Help Needed to Create Special Records

comp.databases.ms-access comp.databases.ms-access


Discuss Help Needed to Create Special Records in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cro
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.