matt beamish
Registered User.
- Local time
- Today, 17:34
- Joined
- Sep 21, 2000
- Messages
- 208
Hi folks,
the following sql works OK for me as part of a larger SQL statement, but I would like to more efficiently reference the Job_Nos from a table in which these particular job_nos are listed.
What would my statement be, to select the Job_nos in the IIf, from a table "tbl_jobnosforactualhrs" rather than separately specified as below.
If I haven't included enough information then apologies.
the following sql works OK for me as part of a larger SQL statement, but I would like to more efficiently reference the Job_Nos from a table in which these particular job_nos are listed.
What would my statement be, to select the Job_nos in the IIf, from a table "tbl_jobnosforactualhrs" rather than separately specified as below.
If I haven't included enough information then apologies.
Code:
Round(((rst.Fields("WeeklyHoursTotal") / 60)) /IIf((rst.Fields("Job_no") = "00001") Or (rst.Fields("Job_no") = "00002") Or (rst.Fields("Job_no") = "00006") Or (rst.Fields("Job_no") = "00007") Or (rst.Fields("Job_no") = "00008") Or (rst.Fields("Job_no") = "00009") Or (rst.Fields("Job_no") = "00011") Or (rst.Fields("Job_no") = "00130") Or (rst.Fields("Job_no") = "0043"), 1, ((Me.[ActWeekHrsTot]) - (Me.[HrsasExactcntrl])) / ((Me.[ContractHourscntrl]) - (Me.[HrsasExactcntrl]))), 2) & ")"