Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Angelo Andales
  Where is Angelo Andales?
 Manila
 Philippines
 Angelo Andales
 To: Benny Thomas
  Where is Benny Thomas?
 Jeddah
 Saudi Arabia
 Benny Thomas
 Tags
Subject: RE: On Error How to handle
Thread ID: 152194 Message ID: 152578 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, November 27, 2007 5:09:11 AM         
   


Here is it Sir Ken,

I try insert ON ERROR in this code under the command button

ON ERROR do ERR

STORE thisform.txtIDNumber.Value TO EmpID
SELECT * FROM tblLoanArchive WHERE tblLoanArchive.cIDNo = EmpID INTO CURSOR TempLoanRecord READWRITE 
APPEND FROM tblLoanHDMFHousing FOR tblLoanHDMFHousing.cIDNo = EmpID
APPEND FROM tblLoanHDMFMulti FOR tblLoanHDMFMulti.cIDNo = EmpID
APPEND FROM tblLoanNHMFC FOR tblLoanNHMFC.cIDNo = EmpID
APPEND FROM tblLoanother FOR tblLoanOther.cIDNo = EmpID
APPEND FROM tblLoanSSSSal FOR tblLoanSSSSal.cIDNo = EmpID
APPEND FROM tblLoanSSSCal FOR tblLoanSSSCal.cIDNo = EmpID

WITH thisform
	Select * from TempLoanRecord where TempLoanRecord.cIDNo = EmpID ORDER BY TempLoanrecord.dDate DESC INTO CURSOR LoanRecord
	.GrdLoan.Recordsource = 'LoanRecord'
	GO TOP 

	.GrdLoan.columncount = 7
	.GrdLoan.column1.header1.Caption = "Loan Type"
	.GrdLoan.column2.header1.Caption = "Date"
	.GrdLoan.column3.header1.Caption = "Loan Amount"
	.GrdLoan.column4.header1.Caption = "Amortization"
	.GrdLoan.column5.header1.Caption = "Amount Deduction"
	.GrdLoan.column6.header1.Caption = "Date Amortization Start"
	.GrdLoan.column7.header1.Caption = "Balance"
	
	.GrdLoan.column1.controlsource = 'Loanrecord.cLoanType'
	.GrdLoan.column2.controlsource = 'Loanrecord.dDate'
	.GrdLoan.column3.controlsource = 'Loanrecord.nAmount'
	.GrdLoan.column4.controlsource = 'Loanrecord.nAmort'
	.GrdLoan.column5.controlsource = 'Loanrecord.nDeduct'
	.GrdLoan.column6.controlsource = 'Loanrecord.dAmortStart'
	.GrdLoan.column7.controlsource = 'Loanrecord.nBalance'
	
	.GrdLoan.column1.Width = 150
	.GrdLoan.column2.Width = 124
	.GrdLoan.column3.Width = 124
	.GrdLoan.column4.Width = 124
	.GrdLoan.column5.Width = 124
	.GrdLoan.column6.Width = 124
	.GrdLoan.column7.Width = 124

	.GrdLoan.column1.header1.Alignment = 2
	.GrdLoan.column2.header1.Alignment = 2
	.GrdLoan.column3.header1.Alignment = 2
	.GrdLoan.column4.header1.Alignment = 2
	.GrdLoan.column5.header1.Alignment = 2
	.GrdLoan.column6.header1.Alignment = 2
	.GrdLoan.column7.header1.Alignment = 2
	
	TextColor = RGB(255, 255, 255)
	BackgroundColor = RGB(124, 165, 209)

	.GrdLoan.column1.ForeColor = textcolor
	.GrdLoan.column1.BackColor = BackgroundColor 
	.GrdLoan.column2.ForeColor = textcolor
	.GrdLoan.column2.BackColor = BackgroundColor 
	.GrdLoan.column3.ForeColor = textcolor
	.GrdLoan.column3.BackColor = BackgroundColor 
	.GrdLoan.column4.ForeColor = textcolor
	.GrdLoan.column4.BackColor = BackgroundColor 
	.GrdLoan.column5.ForeColor = textcolor
	.GrdLoan.column5.BackColor = BackgroundColor 
	.GrdLoan.column6.ForeColor = textcolor
	.GrdLoan.column6.BackColor = BackgroundColor 
	.GrdLoan.column7.ForeColor = textcolor
	.GrdLoan.column7.BackColor = BackgroundColor 

	.GrdLoan.column1.header1.FontSize = 8
	.GrdLoan.column2.header1.FontSize = 8
	.GrdLoan.column3.header1.FontSize = 8
	.GrdLoan.column4.header1.FontSize = 8
	.GrdLoan.column5.header1.FontSize = 8
	.GrdLoan.column6.header1.FontSize = 8
	.GrdLoan.column7.header1.FontSize = 8
	
	.GrdLoan.column1.enabled = .F.	
	.GrdLoan.column2.enabled = .F.
	.GrdLoan.column3.enabled = .F.
	.GrdLoan.column4.enabled = .F.
	.GrdLoan.column5.enabled = .F.
	.GrdLoan.column6.enabled = .F.
	.GrdLoan.column7.enabled = .F.
	
	.GrdLoan.column1.header1.FontBold = .T.
	.GrdLoan.column2.header1.FontBold = .T.
	.GrdLoan.column3.header1.FontBold = .T.
	.GrdLoan.column4.header1.FontBold = .T.
	.GrdLoan.column5.header1.FontBold = .T.
	.GrdLoan.column6.header1.FontBold = .T.
	.GrdLoan.column7.header1.FontBold = .T.	
ENDWITH 
GO TOP 

PROCEDURE Err
	MESSAGEBOX("Wait for 3 seconds before hitting the F8",0+64+256,"System Prompt")
ENDPROC 


If i close the code window or save it that window i posted lately display on screen.

COMPLETE THREAD

On Error How to handle Posted by Angelo Andales @ 11/23/2007 11:38:09 AM
RE: On Error How to handle Posted by Eric den Doop @ 11/23/2007 11:47:43 AM
RE: On Error How to handle Posted by Angelo Andales @ 11/23/2007 12:16:00 PM
RE: On Error How to handle Posted by Ken Murphy @ 11/23/2007 1:09:50 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/25/2007 8:58:49 AM
RE: On Error How to handle Posted by Ken Murphy @ 11/25/2007 2:27:20 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/26/2007 9:07:27 AM
RE: On Error How to handle Posted by Eric den Doop @ 11/26/2007 12:20:14 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/26/2007 2:46:46 PM
RE: On Error How to handle Posted by Ken Murphy @ 11/26/2007 3:17:07 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/27/2007 10:48:40 AM
RE: On Error How to handle Posted by Christian Pano @ 11/27/2007 12:03:41 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/27/2007 1:14:49 PM
RE: On Error How to handle Posted by Christian Pano @ 11/28/2007 1:26:31 AM
RE: On Error How to handle Posted by Angelo Andales @ 11/28/2007 7:04:53 AM
RE: On Error How to handle Posted by Christian Pano @ 11/28/2007 8:05:07 AM
RE: On Error How to handle Posted by Angelo Andales @ 11/28/2007 8:29:37 AM
RE: On Error How to handle Posted by Ken Murphy @ 11/27/2007 1:08:43 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/28/2007 8:37:16 AM
RE: On Error How to handle Posted by Ken Murphy @ 11/28/2007 12:34:16 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/28/2007 1:17:04 PM
RE: On Error How to handle Posted by Ken Murphy @ 11/28/2007 1:25:29 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/29/2007 11:45:43 AM
RE: On Error How to handle Posted by Ken Murphy @ 11/29/2007 1:05:18 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/29/2007 2:17:18 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/29/2007 2:44:31 PM
RE: On Error How to handle Posted by Ken Murphy @ 11/29/2007 3:26:19 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/30/2007 2:48:02 AM
RE: On Error How to handle Posted by Benny Thomas @ 11/25/2007 5:44:41 PM
RE: On Error How to handle Posted by Ken Murphy @ 11/26/2007 1:24:43 PM
RE: On Error How to handle Posted by Benny Thomas @ 11/26/2007 3:48:27 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/27/2007 5:09:11 AM
RE: On Error How to handle Posted by Barbara Peisch @ 11/27/2007 9:19:26 PM
RE: On Error How to handle Posted by Angelo Andales @ 11/28/2007 8:10:50 AM
RE: On Error How to handle Posted by tushar @ 11/29/2007 1:14:55 PM