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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting Distinct Records - Problems

Status
Not open for further replies.

threadgills

Technical User
May 29, 2003
34
0
0
US
I have a table of tasks and about 9 records are "Daily" which are identified in a Frequency field of the TblMain. I also have a complete checkbox, a start_date (prepopulated) and an end_date. Once the complete checkbox is marked, the end_date is updated with today's date. If I check off all 9 records, I want to add those 9 records to TblMain with the next start_date.

I'm currently appending the records with a complete of -1, frequency of "Daily" and an end_date of Date() (Which is the date the user has completed the task) to a temp table. Then I update the complete to 0 and the end_date to Null and the start_date to the next date in line and append those records BACK to the TblMain and all works well.
My dilemma occurs when I complete the same task that has a different start_date and the same end_date...it adds the record twice with the criteria I'm using. The only unique value is the start_date.

Any advise on how I can add another record of the same Task without duplicating it?

Hope this makes sense...I can post the code I'm using now if needed but it's pretty long.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top