Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating new entries using macro's & query's

Status
Not open for further replies.

datsyuk

Programmer
Jun 15, 2012
5
0
0
US
Hi all I'm not entirely sure if what I'm about to describe is possible. I have an input Table with most importantly: skills, dates, and hours as fields. Basically for a certain skill a given number of hours are needed for each month. However, in the current table not all months have hour entries for all skills. What I would like to do is create records for all date/skill combo's with hour value 0 if there is no record that exists.

So:

Skills......Dates......Hours
-----entered data-----
...............................

//append this onto it
--remaining combos--0
.............................0
...

My thoughts for how to go about this is some sort of query against the Master Tables of Skills (and possibly a master Calendar Table). For all records that are unmatched I will need to create a new one in the Labor table w/ value 0 for hours. I am not sure whether I am on the right track for this; if there is a simpler or better way to go about it. I also am not sure how to go about querying for all possible combinations of Skill/Month or creating records with the given value 0 for hours.

Thoughts?
 
Sounds like the right track to me if you're wanting to do this. So... you'd need 2 queries, it sounds like:
1. show me what's not there (assuming you've got another table with those values
2. Append query to append those that don't exist back to the main table..

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top