【正文】
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 = 性別 畢業(yè)設計(論文) 第 頁 39 lblField(4).Caption = 出生年月 lblField(5).Caption = 工作年月 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 畢業(yè)設計(論文) 第 頁 40 39。刷新數據 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 畢業(yè)設計(論文) 第 頁 41 39。保證職工 ID 不會被改變 txtValue(0).Locked = True 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() 畢業(yè)設計(論文) 第 頁 42 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) + 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è)設計(論文) 第 頁 43 畢業(yè)設計(論文) 第 頁 44 They both knew it. And if she hadn39。t won an ecology essay petition and a prize of places for two aboard Sea Shepherd, neither of them would be here. She rested her hand on Gary39。s shoulder and looked at him cheekily. You may be a pain in the neck sometimes, but I39。m glad you39。re ing with me. As Southampton slid astern, Sea Shepherd nosed into the thumping waters of the English Channel. At that moment the sun squinted through a crack in the cloud. On the horizon the sky39。s grey paint was peeling, revealing blue. A good omen? Gary followed Susan down the panionway. See you at dinner, he said, before entering the cabin he shared with Norman. As one of the girls, Susan had Vanessa for a roommate. Next door were Yves and Darren. Susan hesitated outside her cabin, fiddled with her cardigan, ran a b through her hair. Then, head held high, she made her entrance. Vanessa wasn39。t there. Susan relaxed, smiling at herself. The smile faded fast. She39。s taken the bottom bunk! I was here first. Susan stared, glared at the fancy nightdress laid out on the pillow. Did she have the nerve to move it? No, not quite. Fuming, she started to unpac k. Sweaters, Tshirts, jeans, shorts and a dress. She yanked open the wardrobe door. A row of eye catching outfits hung neatly on hangers. It39。s like a fashion store, Susan muttered, shoving the hangers aside to make space for her own clothes. In the bathroom she opened the mirrorfronted cabi on the wall. It was crammed with bottles and jars. Perfume, shampoo, creams ... Susan slammed the cabi shut and pulled a face in the glass. Meanwhile Gary was trying to make friends with Norman. Hard wor k. Norman proved to be a very serious young man, much given to using long words. Must39。ve swallowed