ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Access·s¤â¡A§Ú²{¦b¦³¹J¨ì¦n´X­Ó°ÝÃD??

[µo°Ý] Access·s¤â¡A§Ú²{¦b¦³¹J¨ì¦n´X­Ó°ÝÃD??

¦U¦ì®v¥S®v©j±z¦n¡A§Ú¬OAccess·s¤â¡A§Ú²{¦b¦³¹J¨ì¦n´X­Ó°ÝÃD¡A¦bºô¸ô¤W¦³§ä¨ì¨M¸ÑªºVBA¡A¦ý§ÚÁÙ¬O¨S¿ìªk¹B§@¡A
¤@¡B¦b¸ê®Æªí¸Ì·s¼W¤@­Ó°t°e¸ê®Æ¡A¸Ì­±¦³¤@­ÓÄæ¦ì¥s°t°e³æ¸¹¡A§Æ±æ¬O¥Î·í¤Ñ¤é´Á¥[¬y¤ô½s¸¹¡A¨Ò:20110309001«e­±¤K½X¬O¤é´Á¡A«á­±¤T½X¬O¬y¤ô½s¸¹, ¨ì¤F©ú¤Ñ20110310¤]¬O±q001¶}©l

¤G¡B¦bªí³æ¤¤¡A§Ú·s¼W¤F¤T­Ó¤U©Ô¦¡¿ï³æ©M¤@­Ó¤å¦r¤è¶ô¡A
²Ä¤@­Ó¿ï³æ¬O·s¥_¥«¡B®ç¶é¿¤¡B·s¦Ë¿¤.......           
²Ä¤G­Ó¿ï³æ¬O²Ä¤@­Ó¿ï³æ©Ò¹ïÀ³ªº¡A¨Ò:·s¥_¥« ¹ïÀ³ªº¬O  ¤K¨½°Ï¡B¤T®l°Ï¡B¦Á¤î°Ï......
¾ã¤T­Ó¿ï³æ¬O²Ä¤G­Ó¿ï³æ©Ò¹ïÀ³ªº¡A¨Ò:¤T®l°Ï ¹ïÀ³ªº¬O  ¤¤¤s¸ô¡B´_¿³¸ô¡B¤¤¥¿¸ô.....
¤å¦r¤è¶ô¸Ì©ÒÅã¥Üªº¬O¤T­Ó¿ï³æ©Ò¹ïÀ³ªº¸ê®Æ
¦ý¨C¤@µ§¿ï³æªº¹ïÀ³¸ê®Æªí³£¤£¦P¡A¦ý¬O³£¦³¦Û¤wªº½s¸¹¡A¨Ò:·s¥_¥«½s¸¹¬OD001¡A¤T®l°Ï½s¸¹¬OD001-1¤¤¤s¸ô½s¸¹¬OD001-1-1

¤T¡B¦bªí³æ¤¤»s§@¤@­Ó¦h¶µ¦¡ªº¬d¸ß¡A¨Ò¦p: 1.¿é¤J20110301¤U¤@®æ¿é¤J20110309¬d¸ß20110301~20110309ªº¸ê®Æ
                                        2.¿é¤J¼t°Ó¦WºÙ   ¡A¦ý¬O¬O¥Î¿ï³æ¿ï¨úªº¼t°Ó¦WºÙ¡A¤]¥i¥Hª½±µ¦b¤W­±¥´¬Y¨â­Ó¦r¦b¤W­±¦Û°Ê¸ß§ä

¥H¤W¬O§Ú©Ò¹J¨ì­«¤j°ÝÃD¡A½Ð¦U¦ì®v¥S®v©j¯à¤jµo·O´dªºÀ°À°¤p¤k§Ú§a!:'(

§Ú·|«D±`·PÁ¦U¦ìªº¡AÁÂÁÂ!
celina710828

§Ú¬O·s¤â¡A¤]¬O¾Ç²ß¤¤¡C

TOP

·s¤â¾Ç²ß¤¤~~

TOP

ÁÂÁÂaa7551:
¹ï¤£°_¡A²{¦b¤~¦^Âбz¡A¯uªº«Ü©êºp¡AÁÂÁ±zªº¦^ÂСA§Ú¤w§¹¦¨¤F¡A¦A¦¸Á`Á±zÁÂÁÂ!
celina710828

TOP

¸Õ¸Õ,¤£ª¾¬O§_¯àº¡¨¬celia»Ý¨D
Private Sub ³æ¸¹_DblClick(Cancel As Integer)
    Dim MaxID, date2 As String
    If Me.NewRecord = True Then
     date2 = Format(Date, "YYYYMMDD") '¤µ¤Ñ¤é´Á
     MaxID = DMax("[³æ¸¹]", "¸ê®Æªí1", "Left([³æ¸¹], 8) =" & date2)
     If IsNull(MaxID) Then
     Me![³æ¸¹] = date2 & "001" '¦pªG¤µ¤Ñ¨S¦³¬y¤ô¸¹¡A±q¤µ¤Ñ¤é´Á+"001"¶}©l
     Else
     Me![³æ¸¹] = date2 & Format(CStr(Val(Right(MaxID, 3) + 1)), "000") '¦pªG¤µ¤Ñ¦³¬y¤ô¸¹¡A«h±N³Ì¤j¬y¤ô¸¹¥[1
     End If
    End If
End Sub

TOP

¤@¡B¦b¸ê®Æªí¸Ì·s¼W¤@­Ó°t°e¸ê®Æ¡A¸Ì­±¦³¤@­ÓÄæ¦ì¥s°t°e³æ¸¹¡A§Æ±æ¬O¥Î·í¤Ñ¤é´Á¥[¬y¤ô½s¸¹¡A¨Ò:20110309001«e­±¤K½X¬O¤é´Á¡A«á­±¤T½X¬O¬y¤ô½s¸¹, ¨ì¤F©ú¤Ñ20110310¤]¬O±q001¶}©l

Private Sub °t°e³æ¸¹_DblClick(Cancel As Integer)
Dim MaxID, date2 As String
    If Me.NewRecord = True Then
     date2 = Format(Date, "YYYYMMDD") '¤µ¤Ñ¤é´Á
     MaxID = DMax("[°t°e³æ¸¹]", "±M¨®°t°e¸ê®Æ¿é¤J", "[°t°e³æ¸¹] Like '" & date2 & "*") '§ä¥X¤µ¤Ñ³Ì¤j¬y¤ô¸¹
     If IsNull(MaxID) Then
     Me![°t°e³æ¸¹] = date2 & "001" '¦pªG¤µ¤Ñ¨S¦³¬y¤ô¸¹¡A±q¤µ¤Ñ¤é´Á+"001"¶}©l
     Else
     Me![°t°e³æ¸¹] = date2 & Format(CStr(Val(Right(MaxID, 3) + 1)), "000") '¦pªG¤µ¤Ñ¦³¬y¤ô¸¹¡A«h±N³Ì¤j¬y¤ô¸¹¥[1
     End If
    End If
End Sub
½Ð°Ý¤j¤j­Ì¡A¥H¤W§ÚµLªk°õ¦æ­þ¸Ì¥X¿ù¤F¡A¥i¥HÀ°À°§Ú¦n¶Ü?
celina710828

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD