harleyskater
IT Manager
- Local time
- Yesterday, 19:53
- Joined
- Oct 29, 2007
- Messages
- 95
possible to use DMAX here?
Code:
If 1 > 0 Then
strSql2 = "INSERT INTO [dbo_operations] ( part_item_id , [COLOR=red]job_process_count[/COLOR], operation_num, op_type, op_description, emp_id, est_mins ) " & _
"SELECT " & lngPartItemID & ", [COLOR=#000000]DMax("job_process_count", "dbo_operations", "job_num = 10248"), operation_num , op_type, op_description, emp_id, est_mins " & _
"FROM [dbo_operations_template] WHERE [dbo_operations_template].template_part_item_id = " & lngPartID & ";"
DBEngine(0)(0).Execute strSql2, dbFailOnError
Else
MsgBox "Part record duplicated, but there were no operation records."[/COLOR]
End If