【正文】
Exit Sub 39。 ErrGoto: 39。把錯誤信息保存在文件里 intErrFileNo = FreeFile() Open For Append As intErrFileNo Print intErrFileNo, Chr(34) + Format(Now, YYYYMMDD HH:MM:SS) + Chr(34), Chr(34) + 信息 + Chr(34), Chr(34) + + Chr(34), Chr(34) + cmdAdd_Click(AddEForm) + Chr(34), Chr(34) + + Chr(34) Close intErrFileNo End Sub Private Sub cmdCancel_Click() End Sub 39。初始化 Private Sub Form_activate() lblField(0).Caption = 職工 ID lblField(1).Caption = 職位 lblField(2).Caption = 姓名 lblField(3).Caption = 性別 lblField(4).Caption = 出生年月 lblField(5).Caption = 工作年月 畢業(yè)設計(論文) 第 頁 40 For i = 0 To 5 txtValue(i) = Next End Sub 五,創(chuàng)建修改員工 窗體 39。退出程序 Private Sub cmdCancel_Click() End Sub 39。修改員工信息 Private Sub cmdModify_Click() 39。打開錯誤處理陷阱 Dim intErrFileNo As Integer 39。自由文件號 On Error GoTo ErrGoto 39。 39。生成 SQL 語句 SQL = UPDATE 職工 SET 職工 ID = amp。 txtValue(0).Text amp。 _ ,職位 = amp。 txtValue(1).Text amp。 _ ,姓名 = amp。 txtValue(2).Text amp。 _ ,性別 = amp。 txtValue(3).Text amp。 _ ,出生年月 = amp。 txtValue(4).Text amp。 _ ,工作年月 = amp。 txtValue(5).Text amp。 _ WHERE 職工 ID = amp。 txtValue(0).Text amp。 39。打開連接 OpenDBFile 39。執(zhí)行 SQL SQL 39。關閉連接 CloseDBFile 39。刷新數據 畢業(yè)設計(論文) 第 頁 41 39。 Exit Sub 39。 ErrGoto: 39。把錯誤信息保存在文件里 intErrFileNo = FreeFile() Open For Append As intErrFileNo Print intErrFileNo, Chr(34) + Format(Now, YYYYMMDD HH:MM:SS) + Chr(34), Chr(34) + 信息 + Chr(34), Chr(34) + + Chr(34), Chr(34) + Command1_Click(AddEForm) + Chr(34), Chr(34) + + Chr(34) MsgBox Close intErrFileNo End Sub 39。刷新數據 ,保持一致 Private Sub Form_activate() lblField(0).Caption = 職工 ID lblField(1).Caption = 職位 lblField(2).Caption = 姓名 lblField(3).Caption = 性別 lblField(4).Caption = 出生年月 lblField(5).Caption = 工作年月 For i = 0 To 5 39。當前行 = 39。對應列 = i txtValue(i) = Next 39。保證職工 ID 不會被改變 txtValue(0).Locked = True 畢業(yè)設計(論文) 第 頁 42 End Sub 六,創(chuàng)建職位管理窗體 Public CurPos As Integer Private Sub cmdAdd_Click() End Sub Private Sub cmdCancel_Click() End Sub Private Sub cmdDelete_Click() 39。打開錯誤處理 陷阱 Dim intErrFileNo As Integer 39。自由文件號 On Error GoTo ErrGoto 39。 OpenDBFile If vbYes = MsgBox(是否刪除 amp。 CurPos amp。 ?, vbYesNo) Then = CurPos = 0 DELETE FROM 職位 WHERE 職位 = amp。 amp。 End If CloseDBFile 39。 Exit Sub 39。 ErrGoto: 39。把錯誤信息保存在文件里 intErrFileNo = FreeFile() Open For Append As intErrFileNo 畢業(yè)設計(論文) 第 頁 43 Print intErrFileNo, Chr(34) + Format(Now, YYYYMMDD HH:MM:SS) + Chr(34), Chr(34) + 信息 + Chr(34), Chr(34) + + Chr(34), Chr(34) + cmdDelete_Click(PosForm) + Chr(34), Chr(34) + + Chr(34) Close intErrFileNo End Sub Private Sub cmdRefresh_Click() Exit Sub 39。 ErrGoto: 39。把錯誤信息保存在文件里 intErrFileNo = FreeFile() Open For Append As intErrFileNo Print intErrFileNo, Chr(34) + Format(Now, YYYYMMDD HH:MM:SS) + Chr(34), Chr(34) + 信息 + Chr(34), Chr(34) + + Chr(34), Chr(34) + cmdGenerate_Click(ThisMonthSalaryForm) + Chr(34), Chr(34) + + Chr(34) Close intErrFileNo End Sub Private Sub cmdPrint_Click() End Sub Private Sub Form_Load() mMonth = Format(Date 30, YYYYMM) End Sub Private Sub OLE1_Updated(Code As Integer) End Sub 畢業(yè)設計(論文) 第 頁 44 畢業(yè)設計(論文) 第 頁 45 t was not until midafternoon that the inspector ambled up on his pony. My father pulled himself together, and went out to receive him。 the effort to be even formally polite nearly strangled him. Even then the inspector was not brisk. He dis mounted in a leisurely fashion, and strolled into the ho use, chatting about the weather. Father, red in the face, handed him over to Mary who took him along to mother39。s room. Then followed the worst wait of all. Mary said afterwards that he hummed and ha39。d for an unconscionable time while he examined the baby in minutest detail. At last, however, he emerged, with an expressionless face. In the littleused sittingroom he sat down at the table and fussed for a while about getting a good point on his quill. At last he took a form from his pouch, and in a slow, deliberate hand wrote that he officially found the child to be a true female human being, free from any detectable form of deviation. He regarded that thoughtfully for some moments, as though not perfectly satisfied. He let his hand hesitate before he actually dated and signed it, then he sanded it carefully, and handed it to my enraged father, still with a faint air of uncertainty. He had, of course, no real doubt in his mind, or he would have called for another opinion。 my father was perfectly well aware of that, too. At last Petra39。s existence could be admitted. I was formally told that I had a new sister, and presently I was taken to see he r where she lay in a crib beside my mother39。s bed. She looked so pink and wrinkled to me that I did not see how the inspector could have been quite sure about her. However, there was nothing obviously wrong with her, so she had got her certificate. Nobody could blame the inspector for that。 she did appear to be as nor