hello,
I am reviewing the attached code and trying to add an additional job status condition, "on hold" If this is the chosen condition I want to input the system date into ctldate_changed. However, when I attempt to do this I recieve error " | is not found", or ctldate_changed, must have focus, if I try to set focus I recieve error that the control cannot recieve focus, it is a textbox.
Private Sub ctlJob_Status_AfterUpdate()
If ctlJob_Status = "Shipped" Then
Forms!api_frmItem.SKMInventoryRelief
End If
If [ctlJob_Status].Text = "Startlayout" And IsNull([ctlDate Startlayout]) Then
[ctlDate Startlayout].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Outforapproval" And IsNull([ctlDate Outforapprov]) Then
[ctlDate Outforapprov].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Approved" And IsNull([ctlDate_Approved]) Then
[ctlDate_Approved].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Checkin" And IsNull([ctlDate Checkin]) Then
[ctlDate Checkin].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Engineering" And IsNull([ctlDate Engineered]) Then
[ctlDate Engineered].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Cut" And IsNull([ctlDate Cut]) Then
[ctlDate Cut].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Built" And IsNull([ctlDate Built]) Then
[ctlDate Built].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Shipped" And IsNull([ctlDate Shipped]) Then
[ctlDate Shipped].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Hangers" And IsNull([ctlDate Hangers]) Then
[ctlDate Hangers].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Seals" And IsNull([ctlDate Seals]) Then
[ctlDate Seals].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Invoiced" Then
ctlTruss_Price.Locked = True
ctlHanger_Price.Locked = True
ctlSelling_Price.Locked = True
ctlEngLum_Price.Locked = True
End If
End Sub
I am reviewing the attached code and trying to add an additional job status condition, "on hold" If this is the chosen condition I want to input the system date into ctldate_changed. However, when I attempt to do this I recieve error " | is not found", or ctldate_changed, must have focus, if I try to set focus I recieve error that the control cannot recieve focus, it is a textbox.
Private Sub ctlJob_Status_AfterUpdate()
If ctlJob_Status = "Shipped" Then
Forms!api_frmItem.SKMInventoryRelief
End If
If [ctlJob_Status].Text = "Startlayout" And IsNull([ctlDate Startlayout]) Then
[ctlDate Startlayout].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Outforapproval" And IsNull([ctlDate Outforapprov]) Then
[ctlDate Outforapprov].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Approved" And IsNull([ctlDate_Approved]) Then
[ctlDate_Approved].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Checkin" And IsNull([ctlDate Checkin]) Then
[ctlDate Checkin].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Engineering" And IsNull([ctlDate Engineered]) Then
[ctlDate Engineered].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Cut" And IsNull([ctlDate Cut]) Then
[ctlDate Cut].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Built" And IsNull([ctlDate Built]) Then
[ctlDate Built].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Shipped" And IsNull([ctlDate Shipped]) Then
[ctlDate Shipped].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Hangers" And IsNull([ctlDate Hangers]) Then
[ctlDate Hangers].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Seals" And IsNull([ctlDate Seals]) Then
[ctlDate Seals].Value = CStr(Date)
ElseIf [ctlJob_Status].Text = "Invoiced" Then
ctlTruss_Price.Locked = True
ctlHanger_Price.Locked = True
ctlSelling_Price.Locked = True
ctlEngLum_Price.Locked = True
End If
End Sub