R
Robert Johnson
Hi all. This time I just want to pass a interger into my form. It seemed
like a simple thing to do based on the last time when Seth helped me with a
complex one. Well not for me it seems..
My calling code:
Dim frmAFT As New frmBATFMaint(ByVal InvHID As InvHeaderID)
frmAFT.MdiParent = Me.MdiParent
frmAFT.Show()
My Form code:
Imports System.Diagnostics.Debug
Public Class frmBATFMaint
Public locInvHeaderID As Integer
Public Sub New(ByVal InvHID As locInvHeaderID)
InitializeComponent()
Try
Me.BatF_BO1.FillByInventoryItemID(GRS2.frmInventoryMaint.gloInvHeaderID)
'--record exists.. put in edit mode...
Me.Edit()
Catch ex As Exception
'-- no record exists.. so put in add mode...
Me.Add()
Me.BatF_BO1.Item_ID = frmInventoryMaint.gloInvHeaderID
System.Diagnostics.Debug.WriteLine("gloInvHeader: " &
GRS2.frmInventoryMaint.gloInvHeaderID)
End Try
End Sub
Obviously the passed in value is not getting there.. as the debug window is
showing 0 when the passed in value is a 4. So what am I doing wrong?
Regards,
Robert
like a simple thing to do based on the last time when Seth helped me with a
complex one. Well not for me it seems..
My calling code:
Dim frmAFT As New frmBATFMaint(ByVal InvHID As InvHeaderID)
frmAFT.MdiParent = Me.MdiParent
frmAFT.Show()
My Form code:
Imports System.Diagnostics.Debug
Public Class frmBATFMaint
Public locInvHeaderID As Integer
Public Sub New(ByVal InvHID As locInvHeaderID)
InitializeComponent()
Try
Me.BatF_BO1.FillByInventoryItemID(GRS2.frmInventoryMaint.gloInvHeaderID)
'--record exists.. put in edit mode...
Me.Edit()
Catch ex As Exception
'-- no record exists.. so put in add mode...
Me.Add()
Me.BatF_BO1.Item_ID = frmInventoryMaint.gloInvHeaderID
System.Diagnostics.Debug.WriteLine("gloInvHeader: " &
GRS2.frmInventoryMaint.gloInvHeaderID)
End Try
End Sub
Obviously the passed in value is not getting there.. as the debug window is
showing 0 when the passed in value is a 4. So what am I doing wrong?
Regards,
Robert