|
4#
楼主 |
发表于 2003-4-1 03:19:00
|
只看该作者
我的出错窗体的VBA!请帮忙!
Option Compare Database ' 使用数据库次序进行字符串比较。
Option Explicit ' 使用变量之前要先声明。
Private Sub Command23_Click()
DoCmd.OpenForm "书库查询"
End Sub
Private Sub Com添加读者_Click()
DoCmd.GoToControl , , acNewRec
读者编号.SetFocus
End Sub
Private Sub Command45_Click()
On Error GoTo Err_Command6_Click
Dim stDocName As String
stDocName = "main-2"
DoCmd.OpenForm stDocName, , , , acFormReadOnly, acWindowNormal
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Private Sub Command47_Click()
On Error GoTo Err_Command6_Click
Dim stDocName As String
stDocName = "main-2"
DoCmd.OpenForm stDocName, , , , acFormReadOnly, acWindowNormal
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Private Sub Com添加图书_Click()
DoCmd.OpenForm "添加图书"
End Sub
Private Sub Com修改图书_Click()
DoCmd.OpenForm "修改图书 "
End Sub
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "type"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(-29701) & ChrW(-32763) & ChrW(31383) & ChrW(20307)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click
End Sub
Private Sub Command31_Click()
On Error GoTo Err_Command31_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(28155) & ChrW(21152) & ChrW(-29701) & ChrW(-32763)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command31_Click:
Exit Sub
Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click
End Sub
Private Sub Command32_Click()
On Error GoTo Err_Command32_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(20462) & ChrW(25913) & ChrW(-29701) & ChrW(-32763)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command32_Click:
Exit Sub
Err_Command32_Click:
MsgBox Err.Description
Resume Exit_Command32_Click
End Sub
Private Sub 借阅图书_Click()
DoCmd.GoToRecord , , acNewRec
End Sub
|
|