mike60smart
Registered User.
- Local time
- Today, 04:20
- Joined
- Aug 6, 2017
- Messages
- 2,232
Hi Everyone
I have a Subform which contains the following Unbound Controls
=[cboCarrier].Column(4) Control name is txtIns which displays the following Date: 11/04/1968
=[cboCarrier].Column(5) Control name is txtCargo which displays the following Date: 11/04/1971
=Date() Control name is txtDate to display todays date: 28/12/2022
I am trying to use the after Update of cboCarrier to display a warning if the Dates are Less Than Todays Date.
The after Update event is as follows and it current does nothing and gives no error. Can someone point out where I am going wrong?
Any help appreciated.
	
	
	
		
 I have a Subform which contains the following Unbound Controls
=[cboCarrier].Column(4) Control name is txtIns which displays the following Date: 11/04/1968
=[cboCarrier].Column(5) Control name is txtCargo which displays the following Date: 11/04/1971
=Date() Control name is txtDate to display todays date: 28/12/2022
I am trying to use the after Update of cboCarrier to display a warning if the Dates are Less Than Todays Date.
The after Update event is as follows and it current does nothing and gives no error. Can someone point out where I am going wrong?
Any help appreciated.
		Code:
	
	
	Private Sub cboCarrier_AfterUpdate()
10        On Error GoTo cboCarrier_AfterUpdate_Error
20    If Me.txtDate > Me.txtIns Then
30    MsgBox "Insurance has Expired", vbCritical
35    Me.cboCarrier.SetFocus
40    End If
50    If Me.txtDate > Me.txtCargo Then
60    MsgBox "Cargo Insurance Expired", vbCritical
65     Me.cboCarrier.SetFocus
70    End If
80        On Error GoTo 0
90        Exit Sub
cboCarrier_AfterUpdate_Error:
100       MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure cboCarrier_AfterUpdate, line " & Erl & "."
End Sub 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		