Childformdialog-problem


Author
Message
Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi there,

I have set up a childformdialog and want to have all the Add/EDIT-logic within the

childform. I call the childform with a param-object this way:



Dim aParam(1) As Object

aParam(0) = "N"    --->New record to add, the edit-button on the parentform would set an "E"

aParam(1) = "LIEFMAIN"    --> Name of the calling form

Childliefneu.ShowDialog(aParam)



In the childform I use the following code



Public Sub New(ByVal ParamArray aParam() As Object)

MyBase.new()

' Dieser Aufruf ist für den Designer erforderlich.

InitializeComponent()

' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.

If aParam(0) = "N" Then

Me.lNeu = True

Me.Text = "Lieferanten aufnehmen"   -->"Add a supplier"

LieferBO1.Add()

Else

Me.lNeu = False

Me.Text = "Lieferanten bearbeiten"   --> "Edit a supplier"

LieferBO1.Edit()

End If

Me.cModule = aParam(1)

LieferBO1.Refresh()

Me.Refresh()

End Sub



When I call the childform to add a record, the form does not show an empty record which I expected to be added but the record the current row index points to and the controls are all disabled.

Is my approach wrong or did I miss something?

Thanks in advance

Thomas
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search