Examples: Hide method (window)


The following example compares a transaction amount a user enters in the Receivables Transaction Entry window with the batch limit displayed in an invisible Receivables Batch Entry window:

Private Sub SalesAmount_BeforeUserChanged(KeepFocus As Boolean, _ CancelLogic As Boolean)
	If BatchID.Empty = False Then
		'Open the window and make it invisible
		ExpansionButtons = 1
		ReceivablesBatchEntry.Hide
		'Compare the batch total to the transaction amount entered
		If CCur(SalesAmount)>CCur(ReceivablesBatchEntry _ 
		.BatchTotal) Then
			MsgBox "Amount exceeds batch limit."
			'Clear the batch ID field and move the focus there
			BatchID.Empty = True
			BatchID.Focus
		End If
		'Close the window
		ReceivablesBatchEntry.Close
	End If
End Sub


Documentation Feedback