Public Class frmEditWhere Dim m_sql As String Property sql() As String Get Return m_sql End Get Set(ByVal value As String) m_sql = value End Set End Property Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.sql = Me.Editor.Text Me.DialogResult = Windows.Forms.DialogResult.OK Me.Close() End Sub Private Sub frmEditWhere_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Editor.Text = Me.sql End Sub End Class