HI
I have this code that runs if i enter a date into the Txtboxshipactual and then enters a date into txtExpectedDeliveryHUBactual after its added TxtBoxshipactual.Value then it reruns the date diff into TxtDaysdeltatoplan
My issue is that I have to click the check box once to get the date in txtExpectedDeliveryHUBactual then uncheck and check again to get it in TxtDaysdeltatoplan id like it to be clicked only one time and also if possible when unchecked to delete all info in the txt boxes incase I click by mistake
Heres the full code thanks guys
Private Sub ChkBoxship_Click()
If ChkBoxship Then
If Trim(Me.TxtBoxshipCRS & "") <> "" And Trim(Me.TxtBoxshipactual) <> "" Then
Me.TxtDaysdeltatoplan = DateDiff("d", Me.txtExpectedDeliveryHUBCRS, Me.txtExpectedDeliveryHUBactual)
Me.txtExpectedDeliveryHUBactual = Me.TxtBoxshipactual.Value + txtShippingmethod
End If
Else
Me.TxtDaysdeltatoplan = ""
End If
End Sub
I have this code that runs if i enter a date into the Txtboxshipactual and then enters a date into txtExpectedDeliveryHUBactual after its added TxtBoxshipactual.Value then it reruns the date diff into TxtDaysdeltatoplan
My issue is that I have to click the check box once to get the date in txtExpectedDeliveryHUBactual then uncheck and check again to get it in TxtDaysdeltatoplan id like it to be clicked only one time and also if possible when unchecked to delete all info in the txt boxes incase I click by mistake
Heres the full code thanks guys
Private Sub ChkBoxship_Click()
If ChkBoxship Then
If Trim(Me.TxtBoxshipCRS & "") <> "" And Trim(Me.TxtBoxshipactual) <> "" Then
Me.TxtDaysdeltatoplan = DateDiff("d", Me.txtExpectedDeliveryHUBCRS, Me.txtExpectedDeliveryHUBactual)
Me.txtExpectedDeliveryHUBactual = Me.TxtBoxshipactual.Value + txtShippingmethod
End If
Else
Me.TxtDaysdeltatoplan = ""
End If
End Sub