intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Thực hành Kế toán doanh nghiệp với Access: Phần 2

Chia sẻ: Kiếp Này Bình Yên | Ngày: | Loại File: PDF | Số trang:174

135
lượt xem
20
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Phần 2 của Tài liệu Kế toán doanh nghiệp với Access bắt đầu từ chương 4 đến chương 6 với các nội dung chính như sau: Phân hệ kế toán tồn kho, phân hệ kế toán bán hàng, phân hệ kế toán công nợ. Mời các bạn cùng tham khảo để nắm bắt các nội dung chi tiết.

Chủ đề:
Lưu

Nội dung Text: Thực hành Kế toán doanh nghiệp với Access: Phần 2

  1. C h i/ d n g 4 . Phan he he toan tonhho 1. Cong viec cua phan he ke toan ton kho Doi vdi cac doanh nghiep kinh doanh, ke toan ton kho thvfc chat thi/dng di doi vdi ke toan ban hang va goi chung la ke toan hang hoa. Trong tn/dng hdp do, moi hoa ddn ban hang cung difdc xem la mot phieu xuat kho. Vi the, ban co the gop chung hai phan he nay thanh mot khi xay difng mot chi/dng trinh ke toan. Tuy nhien de ban doc dd roi va tien theo doi hdn, dac biet vdi nhtfng ban mdi lam quen vdi ke toan, nen trong tap sach nay chung toi van tach phan he ke toan hang hoa thanh hai chi/dng rieng biet. Trong do, Chi/dng 4 hi/dng dan ban thiet ke nhtfng chtfc nang lien quan den ke toan hang ton kho va Chi/dng 5 se hi/dng dan ban thiet ke nhtfng chijfc nang con lai phuc vu cho cong tac ke toan ban hang. Hang ton kho la tai san lifu dong cua doanh nghiep di/di hinh thtfc hien vat. H ang ton kho co the mua tif thi tn/dng, hoac do doanh nghiep san xuat, che bien. Chung bao gom: nguyen vat lieu, cong cu. dung cu, san pham dd dang, thanh pham, hang hoa. Cac tai khodn lien quan den hang ton kho la nhtfng tat khodn thuoc nhom 15 nhi/ 151, 152, 153. 155, 156, 157, 159, ... Nhiem vu chinh cua ke toan ton kho la qudn ly so' li/dng va gia til von hang nhap xuat kho hang thang, theo doi tinh hinh hang ton kho di/di dang chi tiet, cung nhi/ tong hdp.
  2. 136 K e to a n d o a n h n g h ie p vdi A c c e s s Do hang hoa nhap kho to gia tri bien dong theo ti/ng thdi diem trong ky hach toan. nen de tinh gia von hang xuat. ke toan phai ap dung mot trong nhtfng phi/dng phap sau. ■ Gia von tdng loai hang theo ti/ng lan nhap (gia dich danh). ■ Ddn gia binh quan trong ky. • Gia binh quan ky tn/dc. ■ Nhap tn/dc, xuat tn/dc. ■ Nhap sau. xuat tn/dc. Chi/dng trinh se tinh gia von hang xuat theo phi/dng phap nhap tn/dc, xuat tn/dc. Chi/dng trinh thtic hien viec quan ly xuat nhap ton kho va cong nd cua mot ddn vi kinh doanh vdi hai ddn vj tien te la USD va VND. Khi tinh phieu xuat kho nhd kem luon ddn gia nhap (de khi can cd the tinh tien Idi tdng phieu xuat). + Cac chdc nang chinh cua phan he: a. Chting ti* nhap h in g : Lap chifng td mua hang td nha cung cap ve nhap kho hoac nhap kho hang ban bi khach tra lai. ■ Loai chdng td: Loai chifng td nhap di/dc cap nhat trong d a n h m u c c h itn g til. ■ Sd chdng td nhap: Sd chdng td nhap (khong di/dc trung vdi sd cua cac chdng td da nhap, mSc dinh la nSm + thang xd ly + sd thd td ldn nhat da cd cong 1). • Ngay nhap hang: Ngay lap chdng td. ■ Ma sd nha cung cap: Ma sd ngi/di cung cap hang. Cd the lap mot ma sd nha cung cap rieng dai dien cho viec mua hang troi noi ngoai thi tn/dng va trd tien m$t. ■ Dien giai: Dien giai ve chvTng tti nhap hang.
  3. C h U d n g 4 . P h a n h e k e to a n to n k h o 137 ■ Hinh thtfc thanh toan: Ti6n mat, tra cham hoac chuyen khoan. Giup phan he ke toan ti6n mat tif lap cac chdng tif chi khi doanh nghiep mua hang tra ti6n mat. • Loai nhap hang: Hinh thdc nhap hang da dang ky trtfdc trong phan danh muc. • Ngifdi nhap: Ma sd nhan vien nhap hang. ■ Nhap vao kho: Ma kho nhan hang. • Ty gia: Ty gia. doanh nghiep phai thanh toan (VND/USD) tai thdi diem nhap hang. Doi vdi doanh nghiep mua hang trd cham bang ngoai te USD, chenh lech ty gia gitfa thdi diem mua hang vdi thdi diem thanh toan thdc te se difdc dda vao khoan chi phi hoac thu nhap bat thddng. Con gia tri von hang nhap luon tinh bang tien VND xac dinh tai thdi diem nhap hang. • Loai thue: Ma sd mile thue VAT phai dong (0%, 5%, 10%. 20%....). ■ TK no: Tai khoan nd. • TK co: Tai khoan cd. + Phan chi tiet cua chdng td nhap hang: Mot chdng td nhap hang cd the nhap nhieu mat hang. ■ MSHH: Ma sd hang hoa. ■ Didn giai: Ten hang. ■ Dvt: DcTn vi tinh. • SL: Sd lddng nhap. • DG USD: Dcfn gia USD. • Ty gia: Ty gia. ■ DG VND: Ddn gia VND. • Thanh tien USD. • Thanh tidn VND.
  4. 138 Ke to a n d o a n h n g h ie p vdi A c c e s s b. Hoa ddn xuat hang: Lap hoa ddn ban ha ng cho khach si lan khach le. Trong do. khach le bat buoc phai thanh toan bang tien mat. • Loai chting tif: Loai chifng tif xuat difdc cap nhat trong d a n h m u c c h d n g til. ■ So chifng tif xuat: So chifng tif xuat (khong difdc trung vdi so cua cac chifng tif da nhap, mSc dinh la n£m + thang xif ly + so thif tif ldn nhat da co cong 1). ■ Ngay xuat hang: Ngay lap chifng tif. • Ma so khach hang: Ma so khach hang, vdi cac khach le co the lap mot ma so rleng la KHLE chang han cho tat ca. Phan dien giai se ghi chu them ten khach 1£ neu muon. ■ Dien giai: Dien giai ve chifng tif xuat hang. ■ Httt: Hinh thifc thanh toan gom tien mat. tra cham ho3c chuyen khoan. Giup phan he ke toan tien mat tif lap cac chifng tif thu khi khach mua hang tra ti6n mat. • Loai xuat hang: Hinh thifc xuat hang da dang kv tnfdc trong phan danh muc. • Ngifdi xuat: Ma so nhan vien ghi phieu xuat hang. • Xuat tif kho: Ma kho xuat hang. • Ty gia: Ty gia khach hang phai thanh toan (VND/USD) cho doanh nghiep tai thdi diem mua hang. Doi vdi khach mua hang tra cham. nd lai bang ngoai te USD. chenh lech ty gia giifa thdi diem mua hang vdi thdi diem thanh toan thifc te se difdc difa vao khodn chi phi hoac thu nhap bat thifdng. Con gia trj von hang xuat ban van luon tinh bang tien VND xac d^nh bang ty gia ban hang tai thdi diem xuat hang. ■ Loai thue: Ma so phan tram thue VAT cua c£r mat hang xuat ban.
  5. C h i/c f n g 4. P h a n h e ke to a n to n k h o 139 ■ TK no: Tai khoan no. • TK co: Tai khoan co. + Phan chi tiet cua chifng ti/ xuat hang: Mot chifng ti/ xuat hang co the xuat nhieu mat hang. • MSHH: Ma so hang hoa. ■ Dien giai: Ten hang. • Dvt: Don vi tinh. ■ SL: So li/dng xuat. ■ DG USD: Don gia USD. • Ty gia: Ty gia. ■ DG VND: Don gia VND. ■ Thanh tien USD. ■ Thanh ti£n VND. ■ In CT: In hoa dOn ban hang. c In chting ttt nhap xuat: In chtfng tir nhap hoSc xuat hang da lap. d. In tong hop nhap xuat. e. In chi tiet Nhap. f. Tinh gia von hang ban. g. Tinh lai ton kho thang. h. Bao cao tong hop ton kho. i. D ong W indows: Thoat khoi phan he hang hoa, trd ve menu chinh cua chi/Ong trinh ke toan. CHUY Chifctng trinh tren minh hpa trUcing hop doanh nghiep mua va ban hang d£u b&ng ngogi td USD. Gia tri VND di*# tinh dtfa tr&n ty gia tgi thcii diem mua ho5c ban. Tat nhien ban co th£ de dang chuyen doi chuong trinh de phyc vu cho cac doanh nghidp mua va ban hang vcii gia VND b3ng cach md
  6. 140 K e to a n d o a n h n g h ie p vdi A c c e s s k h o a c h o n g U d i d u n g n h a p v a o d o n g ia V N D . C o n v d i tru o n g h o p d o a n h n g h ie p m u a h oS c b a n h a n g c o m o t so r n 'it h a n g stf d u n g gia V N D , m o t so stf d u n g gia U S D , h a v c a n th a n ta c h n h o m h a i lo a i h a n g n a y va v ie t th e m n h ifn .; m a le n h ra n g b u o c b a t b u o c p h a i n h a p d d n g ia L S D v d i cac m!>t h a n g su d u n g gia U S D , n e u k h o n g b a n c h i c o th e t in h d ifo c c h in h xa c d d n gia v o n th e o V N D m a t h o i. 2. Thiet ke g iao dien v a m enu chinh c u a phan he Khi ngi/di dung nhap muc Ke toan trong menu chinh va chpn chufc nang Hang hoa d menu popup, form F-MK1NHDOANH se difdc nap va menu chi/dng trinh se thay b§ng menu rieng cua phan he ke toan hang hoa (Hinh 4.1). Khi nhap Thoat, menu phan he Hang hoa se dong lai va menu chinh cua chi/dng trinh md ra. M ic r o s o ft A c c e w B S D H£th6ng Danh muc nh£t li£u B^o cAo Hinh 4.1 Giao di$n chinh cua p h in h$ h & ng h d a v i cac m enu popup.
  7. C h i / d n g 4. P h a n h e k e to a n to n k h o 141 Menu phan he Ke Toan Hang Hoa (Ton kho - ban hang) Cdp nhdt So' li$u B
  8. 142 K e to a n d o a n h n g h ie p vd i A c c e s s + Macro MENU_MAINKD1: Tao cac chtfc nang cap nhat so lieu. Macro name Action Arguments Nhap Shang OpenForm Form Name: F-NHAPHANG View: Form W indow Mode: Normal Xuat &hang OpenForm Form Name: F-XUATHANG View: Form W indow Mode: Normal + Macro MENU_KDBC: Tao cac chijfc nang xtf ly va bao cao hang hoa. M acro name Action Arguments & In chi/ng ti/ nh3p xuat OpenForm Form Name: F-INNX View: Form W indow Mode: Normal In tong hop &nh3p xuat OpenForm Form Name: F-INTHNX View: Form W indow Mode: Normal In &chi tie t nhap OpenForm Form Name: F-THNHAPHANG View: Form W indow Mode: Normal In chi tie t &xuat OpenForm Form Name: F-THXUATHANG View: Form Window Mode: Normal Tinh &gia vtfn hang ban OpenForm Form Name: F-TINHGIAUON View: Form Window Mode: Normal
  9. C h i / d n g 4 . P h a n h e k e to a n to n k h o 143 M acro name Action Argum ents &T(nh lai t6n kho thang OpenForm Form Name: F-THTK View: Form W indow Mode: Normal &Bao c io tdng hop t6n kho OpenForm Form Name: F-THTKIN View: Form W indow Mode: Normal c. Thiet ke g iao d i$n ch in h ch uong trinh (form F - M K I N H D O A N H ; Chon trang Forms, nhap nut New, xong nhap Design View. Kich hoat cijfa sd thuoc tinh (View ** Properties ) va djnh nhtfng thuoc tinh sau cho Form: Form F-MTHUCHITM Properties Caption: Phan he ke toan hang hoa Default View: Single form Record Selectors: No Navigation Buttons: No Dividing Lines: No Record Source: ( trd'ng) Auto Resize: No Menu Bar: menu_mainkd Picture: papermny.jpg On Close: [Event procedure] + Viet ma lenh: O p tio n C o m p a re D a ta b a s e O p tio n E x p lic it P riv a te Sub F o rm _ C lo s e () D o C m d .O p e n F o rm "F -M E N U " , a c N o rm a l E n d Sub
  10. 144 Ke toa n d o a n h n g h ie p vd i A c c e s s 3.Thiet ke form F -N H A P H A N G Chifng tif nhap hang. HC A DON ?fHAPH^ NG I ’ •. H-::* S S ckitiig ti2 |£&\; U»*»* %4 NAm jn) tyK' > Ui ktlM ♦J ’ ::: :rt:;;i H #Det^ N g fy nh&p h&ng Aid %tf n M cung c4p .i"!': ■ D T v n •I ii& IS g iii 'ij [ a e f WS i V | Low chdng U S < f M n g O n h t P i t ^ jS S C lj:/ HTTT NVJ * nh* ’ -*»M V »| ^ U > 0 n h *> h in g ................. - : .... t 4, — r^*s:r U>*it>u4 M H - j TK Coi OiiCiE^-jylyi llililllilliifn;;; s i- lS l s s i l i i n jl i l l l* # Form Footer Hinh 4.2 M an hinh th ie t ke fo rm F-NHAPHANG © He thong M - H s a s 5' * ifep. ■e. z , i . ; ■* Yg v m ►* x i HOA DON NHA P H A NG S B ® ***; ..r9P.^9AI...... 2Z-G1-02 Ma n5 n h i Fd p ' J D \4n g ia i Mua h ln g Los c h d n g id ' f ' J S 6 'chd n g id n hap 20020f 1 H TTT TM JN g d & nh^p 3 Loai n hap h ln g f401 J N hap v lo k h o KHI V| T y g tJ 1 5 ‘■x TK N o Tr f € jrK C o J H in h 4 .3 M i n hinh kS t Q u i form F - N H A P H A N G .
  11. C h i / d n g 4. P h a n h e k e to a n to n k h o 145 Form F-NHAPHANG Properties Caption: ChUng tU nh^p hang Default View: Single form Record Selectors: No Navigation Buttons: No Dividing Lines: No Auto Resize: Yes Auto Center: Yes Record Source: T_HDNHAP Min Max Buttons: Max enabled Menu Bar: mymenu Close Button: Yes On Open: [Event procedure] Filter: (m onth([N G AY]) = [fo rm s ]! [F-nhaphang]! [ThangNao]) And (Year([NGAY]) = [form s]! [F-nhaphang]! [Nam nao]) D a t len form 10 Command button. Command button Dau Name: Dau Caption: DS&u Font Name: VNI-Tim es Font Size: 9 Font Weight: Bold On Mouse Move: [Event procedure] Cancel: No On Click: [Event procedure] CSc Command button con lai: Thig't ke tuong ty vdi thuOc tinh Name tuong Ung la truoc (Trudc), sau (Sau), cuoi (Cuoi), ghi (Ghi), khong (Khong), thoat (Thoat), them (Them), xoa (Xoa), ch itie t (Chi tiet). Ban tif thiet ke lay cac label tren form. Cac Text box tren form: 1. Text box Thang xir ly Name: Thangnao Default Value: Month(Date()) Text Align: Center After Update: [Event procedure] 2. Text box N im x it ly Name: Namnao Default Value: Year(Date()) Format: General number After Update: [Event procedure]
  12. 146 Ke to a n d o a n h n g h ie p vdi A c c e s s 3. Text box So chung tir Name. M_soct Control Source Soct After Update:[Event procedure] On Got Focus. [Event procedure] 4. Text box Ngay nhap hang Name: Ngay Control Source: Ngay Default Value: dd-m m -yy Default Value: Date() I 5. Text box Ty g it Name: Tygia Control Source: Tygia 6 . Text box Thue VAT Name: Tax Control Source: TaxRate 7. Text box G it mua Name: Giamua Control Source: =DSum(',D G USD*SL\ 7 _H D N H A P C T 7S O C T =M _S O C n 8 . Text box Thue khac Name: Thue Control Source: ( rong) 9. Text box Tong Name: Tong Control Source: = D S u m C D G U S D 'S t\ T_HDNHAPCT\'SOCT=M _SO CT’ , 10. Text box So record hi$n hanh Name: Currec Control Source: =[C urrentRecord] 11. Text box Tong so record Name: Numrec Control Source: =DCount(’ s o c n _ h d N H A P \ *(m onth([N G A Y ]) = [fo rm s ]! [F-nhaphang] ![ThangNao]) And (Year([NGAY]) = [form s]![F-nhaphang]![Nam nao])’) 12. Name: CMT Control Source: =Last([Soct]) 13. Name: DMT Control Source: =First([Soct])
  13. C h i / d n g 4. P h a n h e ke to a n to n k h o 147 1 List box: List box Listkho Name: Listkho Row Source Type: Table / Query Column Heads: No Row Source: SELECT T.HDNHAP.SOCT, T_HDNHAP.NGAY FROM t_hdnhap*W HERE (((M o n th ([n g a y]))= [fo rm s]![f-n h a p h a n g ]![th a n g n a o ]) AND ((Y e a r([n g a y ]))= [fo rm s]! [f-nhaphang]! [nam nao])) ORDER BY T.HDNHAP.NGAY, T_HDNHAP.SOCT; Column Count: 2 Column W idth: 0.6-;0.5514- Bound Column: 1 A fter Update: [Event procedure] Cac Combo box: 1. Combo box M a so'nha cung cap Name: Mskh Control Source: Mskh Column Count: 3 Row Source Type: Table / Query Column Heads: No Row Source: SELECT DISTINCTROW T_DMKH.MSKH, T_DMKH.HOKH. T_DMKH.TENKH Column W idth: L im it To List: Yes 0 .4";1.4” ;0.5" List Row: 8 On Not In List: [Event procedure] Bound Column: 1 After Update: [Event procedure] 2. Combo box Lo^i chting tif Name: M sct Control Source: M sct Column Count: 2 Row Source Type: Table / Query Default Value: “051" Row Source: SELECT T.DMCT.MSCT, T_DMCT.DIENGIAI FROM T.D M C T WHERE (((T.DMCT.MSCT) Like -05**)); Bound Column: 1 Column Width: 0 .3 50 7 M .2507' Limit To List: Yes After Update: [Event procedure] Font Name: VNI-Times On Not In List: [Event procedure]
  14. 148 K e to a n d o a n h n g h ie p vdi A c c e s s 3. Combo box Hinh thifc thanh todn ' Name: M shttt Control Source: M shttt Column Count: 2 Row Source Type: Table / Query Column Heads: No Row Source: SELECT DISTINCTRCW [T_DMKTTT] [MSHTTT], [T_DM HTTT].[TENHTTT] FROM [T .D M H TTT]: Bound Column: 1 Column W idth: 0.35";1.5“ Lim it To List: Yes On Not In List: [Event procedure] 4. Combo box Ngifdi nhap hdng Name: Msnv Control Source: Msnv Column Count: 2 Row Source Type: Table / Query Column Heads: No Row Source: SELECT DISTINCTROW [T_DMNV].[MSNV], [T_D M N V].[HO N V] & [T _D M N V ].[TE N N V ] as TEN FROM [T_D M N V]; Bound Column: 1 Column W idth: 0.3507";1.7723” Lim it To List: Yes On Not In List: [Event procedure] 5. Combo box Loai nhap hang Name: Msnx Control Source: Msnx Column Count: 2 Row Source Type: Table / Query Column Heads: No Row Source: SELECT DISTINCTROW [T_DMNX].[MSNX]. [T_DM NX] [LYDO] FROM [T_D M N X]; Bound Column: 1 Column W idth: 0.6 5 “;2“ Lim it To List: Yes On Not In List: [Event procedure] 6 . Combo box Nh$p vao kho Name: Mskho Control Source: M skho Column Count: 2 Row Source Type: Table / Query Column Heads: No Row Source: SELECT DISTINCTROW [T.D M K H O ]. [MSKHO], [T_DMKHO].[DIENGIAI] FROM [T_DMKHO]; Bound Column: 1 Column Width: 0 .3 5 M .2 5 - L im it To List: Yes On Not In List: [Event procedure!
  15. C h i / d n g 4 . P h a n h § ke to a n to n k h o 149 7. Combo box Loai thue Name: M st Control Source: Msthue Column Count: 3 Row Source Type: Table / Query Column Heads: No Row Source: SELECT t_dmthue.MSTHUE, t_dmthue.DIENGIAI, t_dmthue.MUCTHUE FROM t_dmthue; Bound Column: 1 Column W idth: 0 .5 9 2 4 ";1 .3 78 5 ";0 .5 9 r Lim it To List: Yes On Not In List: [Event procedure] 8 . Combo box 73/ khoan nq Name: Tkn Control Source: Tkno Column Count: 2 Row Source Type: Table / Query Default Value: “ 156” Row Source: Q-DSTKNHNO Bound Column: 1 Column W idth: 0.6521 ";2.0021” Lim it To List: Yes On Not In List: [Event procedure] 9. Combo box T ii khoan co Name: Tkc Control Source: Tkco Column Count: 2 Row Source Type: Table / Query Default Value: “ 1111” Row Source: Q-DSTKNHCO Bound Column: 1 Column W idth: 0.6521 ”;2.0021" Lim it To List: Yes On Not In List: [Event procedure] + De lay di/tfc cac tai khoan thich hop vao nhtfng combo box tfng vdi loai chtfng tif thu/chi di/Oc chon, ban can thiet ke them hai query sau: ■ Query Q-DSTKNHNO: M a lenh SQ L ti/cfng ting: SELECT T_DMTKDOI.TKDOI, T_DMTK.DIENGIAI FROM T_DMTK INNER JOIN T_DMTKDOI ON T_DMTK.MSTK = T_DMTKDOI.TKDOI WHERE (((T_DMTKDOI.MSCT)=[FORMS]![F-NHAPHANG]![MSCT]) AND ((T_DMTKDOI.NOCO)="N"));
  16. 150 Ke toa n d o a n h n g h ie p vd i A c c e s s • Query Q-DSTKNHCO: Ma lenh SQL ttfdng tfng: S E LE C T T D M T K D O I. T K D O I, T _ D M T K .D IE N G IA I FR O M T D M T K D O I IN N E R JOIN T D M T K O N T _ D M T K D O I.T K D O I = T D M T K .M S T K W H E R E ( [T _ D M T K D O I].M S C T = [ F O R M S ]!|F -N H A P H A N G IM M S C T )) A N D ([T D M T K D O I ].N O C O = “C"); + Viet ma lenh xtf ly: O p tio n C o m p a re D a ta b a s e O p tio n E x p lic it D im x s o c t, x n g a y , xs l, x th e m , xsua, x x o a 1 C o i form F -n h a p h a n g ct d e cap nhdt thdng tin chi tie t cho chifng tU nhap hang P riv a te Sub c h itie t_ C lic k () O n E rro r G o T o E r r _ c h itie t_ C lic k D im s tD o c N a m e As S trin g D im s tL in k C rite ria As S trin g s tD o c N a m e = "F - N H A P H A N G C T " S tL in k C rite ria = "soct = fo rm s ! [ F - N H A P H A N G ]! [S O C T ]1' D o C m d .O p e n F o rm s tD o c N a m e , , , s tL in k C rite ria E x it_ c h itie t_ C lic k : E x it Sub E r r_ c h itie t_ C lic k : M s g B o x E r r.D e s c rip tio n R e su m e E x it_ c h itie t_ C Iic k E n d Sub P riv a te Sub c h itie t_ M o u s e M o v e (B u tto n A s In te g e r , S h ift A s In te g e r , X As S in g le , y As S in g le) m s g .V is ib le = T ru e m s g .C a p tio n = "C a p n h a t c h tfn g tCr X u a t c h i tie t “ E n d Sub
  17. C h tid n g 4. P h a n h e ke toan ton kho 151 P riv a te Sub c u o i C lic k O O n E rro r G o T o E rr_ c u o i_ C lic k If C M T = SO CT T h e n M s g B o x "B a n d a n g d m a t h a n g c u o i c u n g !", v b E x c la m a tio n + v b D e fa u ltB u tto n l, "C h u y " E lse D o C m d .G o T o R e c o rd , , a cLa st E n d If D o C m d .R e q u e ry "lis tk h o " E x it_ c u o i_ C lic k : E x it Sub E rr_ c u o i_ C lic k : M s g B o x E rr.D e s c rip tio n R esum e E x it_ c u o i_ C lic k E n d Sub P riv a te Sub c u o i M o u s e M o v e t B u tto n As In te g e r, S h ift As In te g e r, X A s S in g le, y As S in g le ) m s g .V is ib le = T ru e m s g .C a p tio n = "V e m a t h a n g c u o i " E n d Sub P riv a te Sub D A U _ C lic k () O n E rro r G o T o E rr_ d a u _ C lic k If D M T = SO C T T h e n M s g B o x "B a n d a n g d m a t h a n g d a u tie n !" , v b E x c la m a tio n + v b D e fa u ltB u tto n l, "C h u y " E lse D oC m d.G oToR ecord , , acFirst End If D oC m d.R equery "listkho" Listkho. Requery E xit_dau_C lick:
  18. 152 Ke to a n d o a n h n g h ie p v d i A c c e s s E x i t Sub Er r d a u C l i c k : MsgBox Err.Description Resume E x i t d a u Click E n d Sub P riv a te Sub D A U M o u s e M o v e tB u tto n 4 s In te g e r, S h ift As In te g e r, X As S in g le, y As Single) m s g .V is ib le = T ru e m s g .C a p tio n = "V e m a u tin d a u tie n " E n d Sub P riv a te Sub F o rm _ O p e n (C a n C e l As In te g e r ) ' L o c ca c c h d n g t it n h a p h a n g c h i tro n g th a n g va n 3 m x it ly ' dUOC c h o n k h i m d fo rm D o C m d .A p p ly F ilte r, "(m o n th ([N G A Y ]) = [form s]![F -n h a p h a n g ]!(T h a n g N a o ]) A n d (Y e a r(]N G A Y ]) = [fo rm s ]![F - n h a p h a n g j![N a m n a o ]r E n d Sub P riv a te Sub g h i C lic k O O n E rro r G o T o E rr_ g h i_ C lic k If Is N u ll(S O C T ) O r Is N u ll(N G A Y ) T h e n M s g B o x "K h o n g d tfo c lUU k h i c o g ia trj ro n g " E x it Sub E lse D o C m d .R u n C o m m a n d (a c C m d S a v e R e c o rd ) L is tk h o .R e q u e ry E n d If L is tk h o .V is ib le = T ru e D A U .V is ib le = T ru e S A U .V is ib le = T ru e T R U O C .V is ib le = T ru e c u o i.V is ib le = T ru e
  19. C h i / d n g 4 . P h a n h e k e to a n to n k h o 153 th o a t.V is ib le = T rue D o C m d .G o T o R e c o rd , , acL ast x o a .V is ib le = T ru e th e m .V is ib le = T ru e x th e m = False D o C m d .G o T o C o n tro l " T H E M " g h i.V is ib le = False k h o n g . V is ib le = False E x it_ g h i_ C lic k : L is tk h o .V is ib le = T ru e D A U . V is ib le = T ru e S A U .V is ib le = T ru e T R U O C .V is ib le = T ru e c u o i.V is ib le = T ru e th o a t.V is ib le = T ru e x o a .V is ib le = T ru e th e m .V is ib le = T ru e D o C m d .G o T o C o n tro l " T H E M " g h i.V is ib le = False k h o n g .V is ib le = False x th e m = False D o C m d .G o T o R e c o rd , , acLast M S N V . R e q u e ry M S N X .R e q u e ry Exit Sub Err ghi_C lick: MsgBox "M a hang hoa da ton t a i 11 D o C m d.R unC o m m and acC m dU ndo J Resume E xit_g hi_C lick End Sub
  20. 154 Ke to a n d o a n h n g h ie p vdi A c c e s s P riv a te Sub g h i M o u s e M o v e (B u tto n As In te g e r , S h ift As In te g e r , X As S in g le , y As Single) m s g .V is ib le = True m s g .C a p tio n = " Li/u m a u tin vC/a th e m " E n d Sub P riv a te Sub k h o n g C lic k f) O n E rro r R esum e N e x t If N o t Is N u ll( N G A Y ) T h e n D o C m d .R u n C o m m a n d a c C m d U n d o E n d If D o C m d .G o T o R e c o rd , , a c F irs t L is tk h o .V is ib le = T ru e D A U .V is ib le = T ru e S A U .V is ib le = T ru e TR U O C . V is ib le = T ru e c u o i.V is ib le = T ru e th o a t. V is ib le = T ru e x o a .V is ib le = T rue th e m .V is ib le = T rue th e m .S e tF o c u s x th e m = False D o C m d .G o T o C o n tro l " T H E M " k h o n g .V is ib le = False g h i.V is ib le = False E n d Sub P riv a te Sub k h o n g _ M o u s e M o v e (B u tto n A s In te g e r , S h ift A s In te g e r , X As S in g le , y As S in g le ) m s g .V is ib le = T ru e m s g .C a p tio n = "K h o n g I i Aj la i m a u tin vCfa th d m " E n d Sub
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2