OfficeÖйúÂÛ̳/AccessÖйúÂÛ̳

 ÕÒ»ØÃÜÂë
 ×¢²á

QQ怬

Ö»ÐèÒ»²½£¬¿ìËÙ¿ªÊ¼

·µ»ØÁÐ±í ·¢ÐÂÌû
²é¿´: 29359|»Ø¸´: 89
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

[´°Ìå] ÃæÏò³õѧÕߵĴ°Ì幦ÄÜÉè¼Æ¼¯³É

[¸´ÖÆÁ´½Ó]
Ìøתµ½Ö¸¶¨Â¥²ã
1#
·¢±íÓÚ 2008-12-27 13:30:22 | Ö»¿´¸Ã×÷Õß »ØÌû½±Àø |µ¹Ðòä¯ÀÀ |ÔĶÁģʽ
¾­¹ýÁ½¸öÔµÄAccessѧϰ£¬¶Ô´°ÌåÉè¼ÆÖеÄһЩ³£Ó÷½·¨ÂÔÓÐÊÕ»ñ£¬ÏÖ½«Æ伯³ÉÔÚÒ»Æ𣬿ÉÄܶÔÆäËû³õѧÕßÓÐËù°ïÖú¡£

´°ÌåÖÐÖ÷Òª°üº¬ÁËÎı¾¿òµÄËø¶¨Óë½âËø£»°´Å¥µÄÒþ²ØÓëÏÔʾ£»×Ó´°ÌåµÄÒþ²ØÓëÏÔʾ£»ÐÐÁеÄÒþ²ØÓëÏÔʾ£»ÐÐÁеÄËø¶¨Óë½âËø£»¼Ç¼µÄ×Ô¶¯±àÂë¡¢ÐÂÔö¡¢É¾³ý£»Í³¼Æ×Ó´°ÌåÊý¾Ý£»×Ó´°Ìå¼Ç¼µÄÌõ¼þ¸ñʽ£»Ñ¹ËõÓëÐÞ¸´Êý¾Ý¿â£»×Ô¶¯ºê£»µÈÏà¹Ø¹¦ÄÜ¡£


»¶Ó­Accessר¼ÒºÍ°®ºÃÕßÔö¼Ó¹¦ÄÜ£¬Îª¹ã´óAccess³õѧÕßÌṩʾ·¶¡£






1¡¢¼ÓÔØʱ£¬Ê¹ÓÃ×Ó´°Ìå1£¬Ñ§Éú±íÈ«²¿¼Ç¼£¬Ëø¶¨Ö÷´°ÌåºÍ×Ó´°Ìå¼Ç¼£¬ÅäÖð´Å¥¡£
Private Sub Form_Load()
Dim sql As String
Me.×Ó´°Ìå.SourceObject = "×Ó´°Ìå1"
sql = "select * from ѧÉú±í"
Me.°à¼¶ID.Locked = True
Me.°à¼¶Ãû³Æ.Locked = True
Me.×Ó´°Ìå.Form.RecordSource = sql
Me.×Ó´°Ìå.Form.AllowAdditions = False
Me.×Ó´°Ìå.Form.AllowDeletions = False
Me.×Ó´°Ìå.Form.AllowEdits = False
Me.Òþ²ØÁÐ.Visible = False
Me.Õ¹¿ªÁÐ.Visible = False
Me.Òþ²ØÐÐ.Visible = False
Me.Õ¹¿ªÐÐ.Visible = False
End Sub


2¡¢¹Ø±Õ´°Ìåʱ£¬Ñ¹Ëõ²¢ÐÞ¸´Êý¾Ý¿â¡£
Private Sub Form_Close()
'ѹËõºÍÐÞ¸´Êý¾Ý¿â
CommandBars("Tools").Controls("Êý¾Ý¿âʵÓù¤¾ß(&D)").Controls("ѹËõºÍÐÞ¸´Êý¾Ý¿â(&C)...").accDoDefaultAction
End Sub


3¡¢Ë«»÷°à¼¶ID»ò°à¼¶Ãû³Æʱ£¬½âËø¡£
Private Sub °à¼¶ID_DblClick(Cancel As Integer)
Me.°à¼¶ID.Locked = False
End Sub


Private Sub °à¼¶Ãû³Æ_DblClick(Cancel As Integer)
Me.°à¼¶Ãû³Æ.Locked = False
End Sub


4¡¢Ê§È¥½¹µãʱ£¬Ëø¶¨°à¼¶ID»ò°à¼¶Ãû³Æ¡£
Private Sub °à¼¶ID_LostFocus()
Me.°à¼¶ID.Locked = True
End Sub


Private Sub °à¼¶Ãû³Æ_LostFocus()
Me.°à¼¶Ãû³Æ.Locked = True
End Sub


5¡¢µ¥»÷ʱ£¬Ê¹ÓÃ×Ö´°Ìå1»ò×Ó´°Ìå2¡£

Private Sub ¸ü»»´°Ìå1_Click()
Me.×Ó´°Ìå.SourceObject = "×Ó´°Ìå1"
Me.Òþ²ØÁÐ.Visible = True
Me.Õ¹¿ªÁÐ.Visible = True
Me.Òþ²ØÐÐ.Visible = True
Me.Õ¹¿ªÐÐ.Visible = True
Me.ÐÂÔö.Visible = True
Me.ɾ³ý.Visible = True
End Sub


Private Sub ¸ü»»´°Ìå2_Click()
Me.×Ó´°Ìå.SourceObject = "×Ó´°Ìå2"
Me.Òþ²ØÁÐ.Visible = False
Me.Õ¹¿ªÁÐ.Visible = False
Me.Òþ²ØÐÐ.Visible = False
Me.Õ¹¿ªÐÐ.Visible = False
Me.ÐÂÔö.Visible = False
Me.ɾ³ý.Visible = False
End Sub


6¡¢µ¥»÷ʱ£¬ÏÔʾ»òÕßÒþ²Ø×Ó´°Ìå¡£
Private Sub Òþ²Ø´°Ìå_Click()
Me.×Ó´°Ìå.Visible = False
End Sub


Private Sub ÏÔʾ´°Ìå_Click()
Me.×Ó´°Ìå.Visible = True
End Sub

7¡¢µ¥»÷ʱ£¬ÏÔʾ»òÒþ²Ø°´Å¥¡£
Private Sub Òþ²Ø°´Å¥_Click()
Me.Òþ²ØÁÐ.Visible = False
Me.Õ¹¿ªÁÐ.Visible = False
Me.Òþ²ØÐÐ.Visible = False
Me.Õ¹¿ªÐÐ.Visible = False
End Sub


Private Sub ÏÔʾ°´Å¥_Click()
Me.Òþ²ØÁÐ.Visible = True
Me.Õ¹¿ªÁÐ.Visible = True
Me.Òþ²ØÐÐ.Visible = True
Me.Õ¹¿ªÐÐ.Visible = True
End Sub


8¡¢µ¥»÷ʱ£¬×Ô¶¯±àºÅ²¢ÐÂÔö¼Ç¼¡£
Private Sub ÐÂÔö_Click()
Dim sql As String
DoCmd.SetWarnings no
sql = "INSERT INTO ѧÉú±í ( °à¼¶ID, ѧÉúID ) "
sql = sql + "SELECT Right(Forms!Ö÷´°Ìå!°à¼¶ID,1) AS °à¼¶ID, IIf(Max([ѧÉúID]) Is Null,Forms!Ö÷´°Ìå!°à¼¶ID & '01',Format(Max([ѧÉúID])+1,'000')) AS ID "
sql = sql + "FROM ѧÉú±í WHERE ѧÉú±í.°à¼¶ID=Forms!Ö÷´°Ìå!°à¼¶ID;"
DoCmd.RunSQL sql
Me.×Ó´°Ìå.Requery
End Sub


9¡¢µ¥»÷ʱ£¬É¾³ýÖ¸¶¨¼Ç¼¡£
Private Sub ɾ³ý_Click()
DoCmd.SetWarnings no
DoCmd.RunSQL "DELETE * FROM ѧÉú±í WHERE ɾ³ý=Yes;"
Me.×Ó´°Ìå.Requery
End Sub

10¡¢µ¥»÷ʱ£¬Ëø¶¨¡¢½âËø¡¢Ë¢ÐÂ×Ó´°Ìå¡£
Private Sub Ëø¶¨_Click()
Me.×Ó´°Ìå.Form.AllowAdditions = False
Me.×Ó´°Ìå.Form.AllowDeletions = False
Me.×Ó´°Ìå.Form.AllowEdits = False
End Sub


Private Sub ½âËø_Click()
Me.×Ó´°Ìå.Form.AllowAdditions = True
Me.×Ó´°Ìå.Form.AllowDeletions = True
Me.×Ó´°Ìå.Form.AllowEdits = True
End Sub


Private Sub Ë¢ÐÂ_Click()
Me.×Ó´°Ìå.Requery
End Sub


11¡¢µ¥»÷ʱ£¬Òþ²Ø»òÕ¹¿ªÁС£
Private Sub Òþ²ØÁÐ_Click()
Me.×Ó´°Ìå.Form.¼Òͥסַ.ColumnHidden = True
Me.×Ó´°Ìå.Form.ÁªÏµµç»°.ColumnHidden = True
End Sub

Private Sub Õ¹¿ªÁÐ_Click()
Me.×Ó´°Ìå.Form.¼Òͥסַ.ColumnHidden = False
Me.×Ó´°Ìå.Form.ÁªÏµµç»°.ColumnHidden = False
End Sub


12¡¢µ¥»÷ʱ£¬Òþ²Ø»òÕ¹¿ªÐС£

Private Sub Òþ²ØÐÐ_Click()
Dim sql As String
sql = "select * from ѧÉú±í where isnull(ÐÕÃû)"
Me.×Ó´°Ìå.Form.RecordSource = sql
Me.×Ó´°Ìå.Requery
End Sub


Private Sub Õ¹¿ªÐÐ_Click()
Dim sql As String
sql = "select * from ѧÉú±í"
Me.×Ó´°Ìå.Form.RecordSource = sql
Me.×Ó´°Ìå.Requery
End Sub



[ ±¾Ìû×îºóÓÉ todaynew ÓÚ 2008-12-28 18:55 ±à¼­ ]

±¾Ìû×ÓÖаüº¬¸ü¶à×ÊÔ´

ÄúÐèÒª µÇ¼ ²Å¿ÉÒÔÏÂÔØ»ò²é¿´£¬Ã»ÓÐÕʺţ¿×¢²á

x
·ÖÏíµ½:  QQºÃÓѺÍȺQQºÃÓѺÍȺ QQ¿Õ¼äQQ¿Õ¼ä ÌÚѶ΢²©ÌÚѶ΢²© ÌÚѶÅóÓÑÌÚѶÅóÓÑ
ÊÕ²ØÊÕ²Ø10 ·ÖÏí·ÖÏí ·ÖÏíÌÔÌû ¶©ÔĶ©ÔÄ
2#
·¢±íÓÚ 2008-12-28 01:35:47 | Ö»¿´¸Ã×÷Õß
Ïë¿´¿´
3#
 Â¥Ö÷| ·¢±íÓÚ 2008-12-28 17:49:49 | Ö»¿´¸Ã×÷Õß

»Ø¸´ 2# µÄÌû×Ó

[:50]
4#
·¢±íÓÚ 2008-12-28 17:54:43 | Ö»¿´¸Ã×÷Õß
лл·ÖÏí!
5#
 Â¥Ö÷| ·¢±íÓÚ 2008-12-28 18:56:09 | Ö»¿´¸Ã×÷Õß

»Ø¸´ 4# µÄÌû×Ó

[:24]
6#
·¢±íÓÚ 2008-12-29 15:06:57 | Ö»¿´¸Ã×÷Õß
ѧϰѧϰ
7#
·¢±íÓÚ 2008-12-29 17:32:34 | Ö»¿´¸Ã×÷Õß
ºð‡S[:50] [:50]
8#
 Â¥Ö÷| ·¢±íÓÚ 2008-12-29 18:01:27 | Ö»¿´¸Ã×÷Õß

»Ø¸´ 7# µÄÌû×Ó

9#
·¢±íÓÚ 2008-12-30 09:57:05 | Ö»¿´¸Ã×÷Õß
·Ç³£ºÃ£¬Ð»Ð»
10#
·¢±íÓÚ 2008-12-30 09:57:26 | Ö»¿´¸Ã×÷Õß
[:50]
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | ×¢²á

±¾°æ»ý·Ö¹æÔò

QQ|Õ¾³¤ÓÊÏä|СºÚÎÝ|ÊÖ»ú°æ|OfficeÖйú/AccessÖйú ( ÔÁICP±¸10043721ºÅ-1 )  

GMT+8, 2024-11-29 15:37 , Processed in 0.105846 second(s), 35 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí