Examples: Open method


The following procedure opens the Receivables Transaction Entry window when using the Open method when the user initially logs into the accounting system.

Private Sub Window_AfterClose()
	On Error GoTo ErrorHandler
	If UserInfoGet.UserID = "LESSONUSER2" Then
		ReceivablesTransactionEntry.Open
	End If
	Exit Sub
ErrorHandler:
	MsgBox “Receivables Transaction Entry could not be opened.”
End Sub

The following procedure “clicks” the lookup button to display the Shipping Methods lookup window:

Private Sub ShippingMethod_AfterGotFocus()
	If ShippingMethod.Empty = True Then
	'No shipping method specified. Click the lookup button
		LookupButtons = 1
	End If
End Sub


Documentation Feedback