S
Sarah Smith
Hello,
I've been trying to create a public property on one form that is
"Setable" from another form.
I have a Sub Main() which creates 2 public instances of the two forms
that make up the project and then loads the first main form using
ShowDialog.
The menu on this form lets you display the second form.
From the second form, I'd like to be able to set a property I've added
to the first form and then close the second form.
(This is a database detail/list view.)
I have created the property in the first form like this:
Public Property intRecordNumber() As Integer
Get
intRecordNumber = intSelectedRow
End Get
Set(ByVal Value As Integer)
nRecord = Value
Call DisplayRecord()
End Set
End Property
VS complains that I am making a reference to a "non-shared member" but
both frmMain and frmListView were declared publicly in the code module
that contains Sub Main().
Can anyone help??
SS.
I've been trying to create a public property on one form that is
"Setable" from another form.
I have a Sub Main() which creates 2 public instances of the two forms
that make up the project and then loads the first main form using
ShowDialog.
The menu on this form lets you display the second form.
From the second form, I'd like to be able to set a property I've added
to the first form and then close the second form.
(This is a database detail/list view.)
I have created the property in the first form like this:
Public Property intRecordNumber() As Integer
Get
intRecordNumber = intSelectedRow
End Get
Set(ByVal Value As Integer)
nRecord = Value
Call DisplayRecord()
End Set
End Property
VS complains that I am making a reference to a "non-shared member" but
both frmMain and frmListView were declared publicly in the code module
that contains Sub Main().
Can anyone help??
SS.