·¢µÄһЩģºýµÄÈÏʶ£¬¶øÇÒÌá¸ßÁËÈí¼þ¿ª·¢µÄˮƽ£¬ÅàÑøÁËÑϽ÷µÄ¹¤×÷×÷·ç£¬Îª½ñºóÔÚ¹¤×÷¸ÚλÉÏÓúùܺüÆËã»ú´òÏÂÁ˼áʵµÄ»ù´¡¡£ ÔÚ×öϵͳµÄ¹ý³ÌÖУ¬ÎÒÓöµ½µÄ×î´óµÄÀ§ÄÑÊǵ÷³ÌÐò·½ÃæµÄ¡£ÔÚÔËÐгÌÐòµÄ¹ý³ÌÖо³£»á³öÏÖ³ÌÐò×ÔÐÐÖжϣ¬ÐèÒª½øÐе÷ÊÔµÄÐÅÏ¢¡£ÕâЩÐÅϢʹµÃÎÒ²»µÃ²»·´¸´¿´Ê飬×ÁÄ¥³ÌÐò¡£ÔÚÒ»±éÒ»±éµÄµ÷ÊÔ֮ϣ¬³ÌÐòÖÕÓÚ±»µ÷ͨÁË¡£ÄÇʱ£¬ÎÒÖÕÓÚ¿ÉÒÔÉÏÉϵÄÊæÒ»¿ÚÆøÁË¡£ ÎÒµÄϵͳ¹æÄ£±È½ÏСͬʱÓÉÓÚÎÒµÄʱ¼äºÍÄÜÁ¦µÈ¶à·½ÃæµÄÒòËØÓ°Ï죬ÎÒÃǵÄϵͳҲ´æÔÚÒ»¶¨µÄȱÏÝ¡£±ÈÈçϵͳµÄ½çÃæ²»¹»ÃÀ¹Û£¬ÓеŦÄܲ»¹»ÍêÉÆµÈ¡£¶Ô´Ë»¹ÇëÀÏʦ¸øÓëÅúÆÀÖ¸½Ì£¬Ê¹ÎÒÄܹýÁ˽⵽ÎÒϵͳÖÐËù´æÔÚµÄȱÏÝÓë²»×ã¡£ ×îºó£¬ºÜ¸ÐлÀÏʦ¶ÔÎÒµÄÖ¸µ¼ºÍ°ïÖú¡£
ͼÊé¹ÜÀíϵͳERͼ-Á÷³Ìͼ-¹¦Äܽṹͼ-Ô´´úÂë Ô´³ÌÐòÇåµ¥
1¡¢ÎļþÃû login(login.frm)
¹¦ÄÜ˵Ã÷£ºÕû¸öϵͳµÄµÇ½½çÃæ£¬ÐèÒªÊäÈëÓû§ÃûºÍµÇ½ÃÜÂë²ÅÄܽøÈ뵽ϵͳÖУ¬½øÐнèÔĵȲÙ×÷¡£ Ô´´úÂ룺
Option Explicit Dim cnt As Integer
Private Sub Command1_Click() Dim sql As String
Dim rs_login As New ADODB.Recordset If Trim(Combo1.Text) = \
MsgBox \ûÓÐÕâ¸öÓû§\ Combo1.SetFocus Else
sql = \ϵͳ¹ÜÀí where Óû§Ãû='\ rs_login.Open sql, conn, adOpenKeyset, adLockPessimistic If rs_login.EOF = True Then
MsgBox \ûÓÐÕâ¸öÓû§\ Combo1.SetFocus Else
If Trim(rs_login.Fields(1)) = Trim(txtpwd.Text) Then userID = Combo1.Text rs_login.Close Unload Me form1.Show Else
MsgBox \ÃÜÂë²»ÕýÈ·\ txtpwd.SetFocus End If End If End If
cnt = cnt + 1 If cnt = 3 Then Unload Me
End If Exit Sub End Sub
Private Sub Command2_Click() Unload Me End Sub
Private Sub Form_Load()
Dim connectionstring As String
connectionstring = \ \ conn.Open connectionstring cnt = 0 End Sub
Private Sub txtuser_Change() End Sub
2¡¢ÎļþÃû form1(form1.frm)
¹¦ÄÜ˵Ã÷£ºÕû¸öϵͳµÄÖ÷½çÃæ£¬ÆäÖаüÀ¨Í¼Êé¹ÜÀí¡¢¶ÁÕß¹ÜÀí¡¢Í¼Êé½èÔĹÜÀí¡¢ÏµÍ³¹ÜÀí¡¢¹ØÓÚ£¬ÒÔ¼°ÔÚÕâÏÂÃæµÄ×Ӳ˵¥¡£ Ô´´úÂ룺
Private Sub add_admin_Click() frmadduser.Show End Sub
Private Sub add_back_book_Click() frmbackbookinfo.Show End Sub
Private Sub add_book_info_Click() frmaddbookinfo.Show End Sub
Private Sub add_book_style_Click() frmaddbookstyle.Show End Sub
Private Sub add_lend_book_Click() frmfindbook.Show End Sub
Private Sub add_reader_info_Click() frmaddreaderinfo.Show End Sub
Private Sub add_reader_style_Click() frmaddreaderstyle.Show End Sub
Private Sub change_pwd_Click() frmchangepwd.Show End Sub
Private Sub del_book_info_Click()
frmmodifybookinfo.Show End Sub
Private Sub del_book_style_Click() frmmodifybookstyle.Show End Sub
Private Sub del_reader_info_Click() frmreaderinfo.Show End Sub
Private Sub del_reader_style_Click() frmmodifyreaderstyle.Show End Sub
Private Sub exit_sys_Click() End End Sub
Private Sub find_book_info_Click() frmfindbook.Show End Sub
Private Sub find_lend_book_Click() frmfindborrowinfo.Show End Sub
Private Sub find_reader_info_Click() frmfindreader.Show End Sub
Private Sub Form_Load() End Sub
Private Sub gly_Click() Form2.Show End Sub
frmmodifybookstyle.Show End Sub
Private Sub modify_reader_info_Click() frmreaderinfo.Show End Sub
Private Sub modify_reader_style_Click()
ͼÊé¹ÜÀíϵͳVB+Access frmmodifyreaderstyle.Show End Sub
3¡¢ÎļþÃû frmaddbookstyle(frmbookstyle.frm) ¹¦ÄÜ˵Ã÷£ºÓÃÓÚÌí¼ÓͼÊéÀà±ðÐÅÏ¢¡£ Ô´´úÂ룺
Option Explicit
Private Sub Command1_Click()
Dim rs_bookstyle As New ADODB.Recordset Dim sql As String
If Trim(Text1.Text) = \
MsgBox \ͼÊéÖÖÀ಻ÄÜΪ¿Õ\ Text1.SetFocus Exit Sub End If
If Trim(Text2.Text) = \
MsgBox \ÖÖÀà±àºÅ²»ÄÜΪ¿Õ\ Text2.SetFocus Exit Sub End If
sql = \ͼÊéÀà±ð where Àà±ðÃû³Æ='\ rs_bookstyle.Open sql, conn, adOpenKeyset, adLockPessimistic If rs_bookstyle.EOF Then rs_bookstyle.AddNew
rs_bookstyle.Fields(0) = Trim(Text1.Text) rs_bookstyle.Fields(1) = Trim(Text2.Text) rs_bookstyle.Update
MsgBox \Ìí¼ÓͼÊéÀà±ð³É¹¦£¡\ rs_bookstyle.Close Else
MsgBox \¶ÁÕßÀà±ðÖØ¸´£¡\ Text1.SetFocus Text1.Text = \ rs_bookstyle.Close Exit Sub End If End Sub
Private Sub Command2_Click() Unload Me End Sub
4¡¢ÎļþÃû frmmodifybookstyle£¨code£©
¹¦ÄÜ˵Ã÷£ºÍ¼ÊéÀà±ð¹ÜÀí£¬¿ÉÒÔÐ޸ĺÍɾ³ýͼÊéÀà±ð¡£ Ô´´úÂ룺
Option Explicit
Dim rs_reader As New ADODB.Recordset Private Sub cmdcancel_Click() rs_reader.CancelUpdate DataGrid1.Refresh
DataGrid1.AllowAddNew = False DataGrid1.AllowUpdate = False cmdmodify.Enabled = True
cmddel.Enabled = True cmdcancel.Enabled = False cmdupdate.Enabled = False End Sub
Private Sub cmddel_Click() Dim answer As String On Error GoTo delerror
answer = MsgBox(\È·¶¨ÒªÉ¾³ýÂð£¿\ If answer = vbYes Then
DataGrid1.AllowDelete = True rs_reader.Delete rs_reader.Update DataGrid1.Refresh
MsgBox \³É¹¦É¾³ý£¡\ DataGrid1.AllowDelete = False Else
Exit Sub End If delerror:
If Err.Number <> 0 Then MsgBox Err.Description End If End Sub
Private Sub cmdmodify_Click() Dim answer As String
On Error GoTo cmdmodify cmddel.Enabled = False cmdmodify.Enabled = False cmdupdate.Enabled = True cmdcancel.Enabled = True
DataGrid1.AllowUpdate = True cmdmodify:
If Err.Number <> 0 Then MsgBox Err.Description End If End Sub
Private Sub Command5_Click() rs_reader.Update DataGrid1.Refresh End Sub
Private Sub cmdupdate_Click()
If Not IsNull(DataGrid1.Bookmark) Then rs_reader.Update End If