Hi,
I have run into a weird problem with a panel on one of my forms. I have a sub that all it does it clear out the 10 texts boxes and inactivates them on the panel. i also have refresh button on the panel. Now when i call the sub from a button just sitting on the form it goes thru the steps of clearing out the text boxes on the panel and inactivating them but when you get back to the screen the data is still there. Then if you click on the reset button which is on the panel it clears the text boxes and inactivates them. I am calling me. below is the sub that i am calling. any help is greatly appreciated.
thanks,
Bueller
Private Sub ClearScreen()
Me.lblnReset = True
Me.lblPalletID.Text = ""
Me.lblPalletNum.Text = ""
Me.txtCopyCount.Text = ""
Me.txtCopyCount.Enabled = False
Me.txtSacks.Text = ""
Me.txtSacks.Enabled = False
Me.txtPieces.Text = ""
Me.txtPieces.Enabled = False
Me.txtUnitWeight.Text = ""
Me.txtUnitWeight.Enabled = False
Me.txtPalletWeight.Text = ""
Me.txtPalletWeight.Enabled = False
Me.txtDesc1.Text = ""
Me.txtDesc2.Text = ""
Me.txtDesc1.Enabled = False
Me.txtDesc2.Enabled = False
Me.txtContents1.Text = ""
Me.txtContents2.Text = ""
Me.txtContents1.Enabled = False
Me.txtContents2.Enabled = False
Me.cmbDestination.Text = ""
Me.cmbDestination.Enabled = False
Me.txtShipDate.Text = "MM/DD/YYYY"
Me.txtShipDate.Enabled = False
Me.txtBCT.Text = ""
Me.txtBCT.Enabled = False
'set the buttons
Me.cmdNewPallet.Enabled = True
Me.cmdDeletePallet.Enabled = False
Me.cmdSavePallet.Enabled = False
Me.lblnNew = False
Try
'load the grid
LoaddgPallet()
LoadDestinations()
Catch Exp As Exception
Errorcls.ErrorTrap(gstrAppName, Exp)
MsgBox("An error occured loading the Data!", MsgBoxStyle.Exclamation, "Data Error"
Finally
Me.lblnReset = False
Me.Refresh()
Me.Panel1.Refresh()
End Try
End Sub
I have run into a weird problem with a panel on one of my forms. I have a sub that all it does it clear out the 10 texts boxes and inactivates them on the panel. i also have refresh button on the panel. Now when i call the sub from a button just sitting on the form it goes thru the steps of clearing out the text boxes on the panel and inactivating them but when you get back to the screen the data is still there. Then if you click on the reset button which is on the panel it clears the text boxes and inactivates them. I am calling me. below is the sub that i am calling. any help is greatly appreciated.
thanks,
Bueller
Private Sub ClearScreen()
Me.lblnReset = True
Me.lblPalletID.Text = ""
Me.lblPalletNum.Text = ""
Me.txtCopyCount.Text = ""
Me.txtCopyCount.Enabled = False
Me.txtSacks.Text = ""
Me.txtSacks.Enabled = False
Me.txtPieces.Text = ""
Me.txtPieces.Enabled = False
Me.txtUnitWeight.Text = ""
Me.txtUnitWeight.Enabled = False
Me.txtPalletWeight.Text = ""
Me.txtPalletWeight.Enabled = False
Me.txtDesc1.Text = ""
Me.txtDesc2.Text = ""
Me.txtDesc1.Enabled = False
Me.txtDesc2.Enabled = False
Me.txtContents1.Text = ""
Me.txtContents2.Text = ""
Me.txtContents1.Enabled = False
Me.txtContents2.Enabled = False
Me.cmbDestination.Text = ""
Me.cmbDestination.Enabled = False
Me.txtShipDate.Text = "MM/DD/YYYY"
Me.txtShipDate.Enabled = False
Me.txtBCT.Text = ""
Me.txtBCT.Enabled = False
'set the buttons
Me.cmdNewPallet.Enabled = True
Me.cmdDeletePallet.Enabled = False
Me.cmdSavePallet.Enabled = False
Me.lblnNew = False
Try
'load the grid
LoaddgPallet()
LoadDestinations()
Catch Exp As Exception
Errorcls.ErrorTrap(gstrAppName, Exp)
MsgBox("An error occured loading the Data!", MsgBoxStyle.Exclamation, "Data Error"
Finally
Me.lblnReset = False
Me.Refresh()
Me.Panel1.Refresh()
End Try
End Sub