Good morning.
I have an On Exit event for a text box 'CMS ID' that fills in data on a data entry form, if there is data available (pulling in data from another table
based on the CMS ID). The event works as it should however if the data is cleared from the CMS ID and new data is entered (in the event the CMS ID was keyed incorrectly / typo) the information does not update as it did the first time the data was entered
for the CMS ID.
Attached is the On Exit event which works correctly the first time but does not update if the CMS ID is updated.. Any feedback or suggestions would be greatly appreciated.
Thank you for your time.
I do want to add the CustomerFirstName, CustomerLastName,CustomerStreetAddress does change when the CMS ID changes it’s the First_Name, Last_Name, Address that does not change / update.. if that makes any sense.
Private Sub CMS_ID_Exit(Cancel As Integer)
|
[Completed_By] = theUserName()
|
If IsNull([Letter Type]) Then
|
[Letter Type].Value = Form.RecordSource
|
End If
|
If IsNull([First_Name]) = True Then
|
[First_Name]=CustomerFirstName]
|
End If
|
If IsNull([Last_Name]) = True Then
|
[Last_Name] =[CustomerLastName]
|
End If
|
If IsNull([Address]) = True Then
|
[Address] = [CustomerStreetAddress]
|
End If
|
If IsNull([City]) = True Then
|
[City] = [CustomerCity]
|
End If
|
If IsNull([State]) = True Then
|
[State] = [CustomerState]
|
End If
|
If IsNull([Zip_Code]) = True Then
|
[Zip_Code] = [CustomerZipCode]
|
End If
|
If IsNull([DNR_Date]) = True Then
|
[DNR_Date] = [DueDateDD]
|
End If
|
End Sub
|