【正文】
使得用戶在職工號的任何地方輸入空格字符都不會被寫入文本框 Private Sub text_seek_name_Change() sqlstr = select * from empinfom where empname=39。 amp。 amp。 39。 If Then = sqlstr End If 根據(jù)輸入的名字動態(tài)查找符合條件的 Private Sub text_seek_no_Change() sqlstr = select * from empinfom where empno=39。 amp。 amp。 39。 If Then = sqlstr End If 動態(tài)查找符合條件的職工號 sqlstr = select * from empinfom where realwage= amp。 If Then = sqlstr End If 動態(tài)查找實發(fā)工資 : 本模塊的主要功能是實現(xiàn)多個字段的報表打印,使用戶能夠更直 觀、更詳細(xì)的了解具體工資的發(fā)放。為了方便用戶的操作,模塊窗體設(shè)計了五個不同條件的單選按鍵,其中包括:按職工號打印工資報表、按部門名打印工資報表、按姓氏打印工資報表、按年齡打印工資報表、按性別打印工資報表。用戶可以根據(jù)自己的實際情況或是喜好來選擇合適的打印報表方式。本模塊主界面如果下: 各條件報表打印功能說明如下: 按職工號打印報表: 當(dāng)用戶選擇了“按職工號打印”這個單選按鈕時,之后的文本輸入框顏色自動變成白色,此文本框是用來輸入職工號,以便打印一個職工的工資情況。當(dāng)選中第一個時,其它的文本輸入 框為藍(lán)色,表示不可寫,用戶此時不可以在其它的文本框中輸入信息,如果要在其它的文本框中輸入信息就必須先選中文本框前對應(yīng)的單選按鈕,之后才可以在單選按鈕后面對應(yīng)的文本輸入框中輸入信息,此時,之前的文本輸入框中的信息自動清空,并且文本輸入框的顏色變?yōu)樗{(lán)色,為不可寫。 按部門號打印報表: 當(dāng)用戶選中了這個按鈕時,必須在其后面相對應(yīng)的文本框中輸入“部門號”,然后按“打印”按鈕,此時就會把和文本輸入框中相同部門號的記錄全部顯示出來,方便用戶的操作。 按姓氏打印: 當(dāng)用戶選中了這個按鈕時,必須在其后面相對應(yīng)的 文本框中輸入“姓氏”,然后按“打印”按鈕,此時就會把和文本輸入框中相同姓氏的記錄全部顯示出來,方便用戶的操作。 按年齡打?。? 當(dāng)用戶選中了這個按鈕時,必須在其后面相對應(yīng)的文本框中輸入“年齡”,然后按“打印”按鈕,此時就會把和文本輸入框中相同年齡的記錄全部顯示出來,方便用戶的操作。 按性別打印: 當(dāng)用戶選中了這個按鈕時,必須在其后面相對應(yīng)的文本框中輸入“性別”,然后按“打印”按鈕,此時就會把和文本輸入框中相同性別的記錄全部顯示出來,方便用戶的操作。 打印報表的代碼如果下: sql = select 職工號 ,empname 姓名 ,sex 性別 ,age 年齡 ,realwage 實發(fā)工資 ,basicwage 基本工資 ,deptname 部門名 ,superfluity 獎金 ,housemoney 房租 ,watelec 水電費 ,supply 供 基 金 from empinfom,bakshishm,spendm,jobm where = and =bakshis and = and =39。 sql amp。 Trim(Text1(0).Text) amp。 39。 1 根據(jù)所輸入的職工號來顯示并打印與輸入職工號相同的員工工資報表。 If Trim(Text1(1).Text) = Trim((deptname)) Then sql = select 職工號 ,empname 姓名 ,sex 性別 ,age 年齡 ,realwage 實發(fā)工資 ,basicwage 基本工資 ,deptname 部門名 ,superfluity 獎金 ,housemoney 房租 ,watelec 水電費 ,supply 供基金 from empinfom,bakshishm,spendm,jobm where = and = and = and =39。 sql amp。 Trim(Text1(1).Text) amp。 39。 1 根據(jù)所輸入的部門名的不同來顯示并打印不同的報表。 = adCmdTable = empinfom If Trim(Text1(2).Text) = Left(Trim((empname)), 1) Or Trim(Text1(2).Text) = Left(Trim((empname)), 2) Then sql = select 職工號 ,empname 姓名 ,sex 性別 ,age 年齡 ,realwage 實發(fā)工資 ,basicwage 基本工資 ,deptname 部門名 ,superfluity 獎金 ,housemoney 房租 ,watelec 水電費 ,supply 供基金 from empinfom,bakshishm,spendm,jobm where = and = and = and like39。 sql amp。 Trim(Text1(2).Text) amp。 %39。 1 根據(jù)輸入的姓氏來顯示并打印所有員工的姓氏與輸入的姓氏相同的員工工資報表。 sql = select 職工號 ,empname 姓名 ,sex 性別 ,age 年齡 ,realwage 實發(fā)工資 ,basicwage 基本工資 ,deptname 部門名 ,superfluity 獎金 ,housemoney 房租 ,watelec 水電費 ,supply 供 基 金 from empinfom,bakshishm,spendm,jobm where = and = and = and =39。 sql amp。 Trim(Text1(3).Text) amp。 39。 1 根據(jù)輸入的具體年齡來顯示并打印與輸入的年齡相同的員工工資報表。 If Trim(Text1(4).Text) = Trim((sex)) Then sql = select 職工號 ,empname 姓名 ,sex 性別 ,age 年齡 ,realwage 實發(fā)工資 ,basicwage 基本工資 ,deptname 部門名 ,superfluity 獎金 ,housemoney 房租 ,watelec 水電費 ,supply 供 基 金 from empinfom,bakshishm,spendm,jobm where = and = and = and =39。 sql amp。 Trim(Text1(4).Text) amp。 39。 1 根據(jù)輸入的性別(男或女)不同來確定要顯示并打印的員工工資報表。 數(shù)據(jù)字典 職工信息表 e m pi n f oM字段名 說明 數(shù)據(jù)類型 長度 約束e m pn o 職工號 c h a r 8 非空主鍵e m pN a m e 職工名 c h a r 8 非空A g e 年齡 da t e t i m e 非空S e x 性別 bi t 男 39?;?39。女 39。T e l e ph on e 電話 c h a r 20A ddr e s s 住址 c h a r 100R e a l W a g e 實發(fā)工資 s m a l l m on e y 非空且大于 0 職位信息表 j obM字段名 說明 數(shù)據(jù)類型 長度 約束e m pn o 職工號 c h a r 8 非空主鍵J ob 職位 c h a r 8 可選de pt n o 部門號 c h a r 4 職工號前四位D e pt N a m e 部門名 c h a r 10 非空W or kA g e 工齡 t i n y i n t 大于等于 0B a s i c W a g e 基本工資 s m a l l m on e y 大于等于 0 津貼信息表 ba ks h i s h M字段名 說明 數(shù)據(jù)類型 長度 約束e m pn o 職工號 c h a r 8 非空主鍵ov e r t i m e S 基本加班津貼 s m a l l m on e y 8 大于 0e v e c t i on S 基本出差津貼 s m a l l m on e yL e n O f S e r 基本工齡金 s m a l l m on e y 8 大于 0 精確到百分位O n e Y e a r 年終獎金 s m a l l m on e y 8 大于 0 精確到百分位S u pe r F l u i t y 額外獎金 s m a l l m on e y 8 大于 0a bs e n c e 缺勤基本金 s m a l l m on e y 大于等于零 開銷 s pe n dM字段名 說明 數(shù)據(jù)類型 長度 約束e m pn o 職工號 c h a r 8 非空主鍵m e di c P r e 醫(yī)保 s m a l l m on e y 大于等于 0S oc i a l P r e 社保 s m a l l m on e y 大于等于 0I s H ou s i n g 住房否 c h a r 2 非空H ou s e m on e y 住房費 s m a l l m on e y 大于等于 0W a t E l e c 水電費 s m a l l m on e y 大于等于 0S u ppl y 供基金 s m a l l m on e y 大于等于 0 權(quán)限與密碼 P A S字段名 說明 數(shù)據(jù)類型 長度 約束e m pn o 職工號 c h a r 8 非空主鍵pa s s W or ds 密碼 c h a r 32 非空pow e r s 權(quán)限 枚舉 非空 基本工資標(biāo)準(zhǔn)表 s a l a r y m字段名 說明 數(shù)據(jù)類型 長度 約束de pt n a m e 部門名 c h a r 8de pt n o 部門號 c h a r 4 非空主鍵j ob 職位 c h a r 8 非空主鍵ba s i c w a g e 基本工資 s m a l l m on e y 非空 checkwm 考勤表 字段名 說明 數(shù)據(jù)類型 長度 約束 empno 工號 overtime 加班 silklea 病假 Pub 公假 Late 遲到 Absence evection 出差 Affair 事假 54 Of Vainglory It was prettily devised of Aesop。 the fly sat upon the axletree of the chariot wheel, and said. What a dust do I raise? So are there some vain persons, that whatsoever goeths indeed! They could tell us something worth hearing, if they only knew how to talk. It39。s really a pleasure now and then to bee a mere nothing, especially when a man is as highly placed as I am. And then to think that we all, even with patent lacquer, are nothing more than insects of a moment on that anthill the earth, though we may be insects with stars and garters, places and offices! One feels quite a novice beside these venerable millionyearold boulders. On last New Year39。s eve I was reading the book, and had lost myself in it so pletely, that I fot my usual New Year39。s diversion, namely, the wild hunt to Amack. Ah, you don39。t know what that is!