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

How to update a start month field in my detail table? 1

Status
Not open for further replies.

saigonva

Programmer
Joined
Jul 1, 2008
Messages
1
Location
US
I have my detail table as followed:
(pk) wbs_tag
(pk) r_tag
(pk) year
startmonth (empty)
duration (empty)
quantity (empty)

And a monthly_detail table as followed:
(pk) wbs_tag
(pk) r_tag
(pk) year
month
quantity


Data will be like:
Detail table:
wbs_tag = 1
r_tag = 1
year = 2000

Monthly_detail table:
wbs_tag = 1
r_tag = 1
year = 2000
{month, quantity} = {7, 4}, {8, 2}, {9, 3}

I want to update the startmonth field in the detail table
as:
Detail.startmonth = 7 (the first record value).

what should I do to archive this task.

Thanks,

saigonva
 
UPDATE Detail
SET startmonth = DMin("[month]","Monthly_detail","wbs_tag=" & wbs_tag & " AND r_tag=" & r_tag & " AND [Year]=" & [Year])

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top