Examples: AfterModalDialog event

This procedure runs when the accounting system displays an ask dialog that prompts the user to save changes to a customer record in the Customer Maintenance window. If the user clicks the Save button in the save dialog, this procedure saves the corresponding DUOS object:

Private Sub Window_AfterModalDialog(ByVal DlgType As Long, _ PromptString As String, Control1String As String, _ 
Control2String As String, Control3String As String, Answer As Long)
	Dim Customers As DUOSObjects
	Dim Customer As DUOSObject

	If PromptString = "Do you want to save changes to this " + _
	"customer?" Then
		'The user is trying to save the record using the save dialog
		If Answer = dcButton1 Then 'The user clicked Save
			Set Customers = DUOSObjectsGet("Customer Info")
			Set Customer = Customers(CustomerID)
			Customer.Properties("URL Address") = URLAddress
			Customer.Properties("Contact E-Mail Address") = _
		End If
	End If
End Sub

Documentation Feedback