Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Panel refresh

Status
Not open for further replies.

bueller

Programmer
Aug 27, 2002
76
US
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
 
Hi buller
when you put the button on form and refrence as Me.TexBox1 its checking that Textbox on that Form so Me is the FORM at that point but when you move the button inside the panel and then issue Me.Textbox1 then now the Me refrers to you panel ,I hope you understand it
Regards
Nouman

Nouman Zaheer
Software Engineer
MSR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top