Office中国论坛/Access中国论坛
标题:
我为什么生成不了MDE文件?
[打印本页]
作者:
china-girl
时间:
2003-4-1 02:13
标题:
我为什么生成不了MDE文件?
转换时说我的窗体有问题!WHY?
作者:
zhengjialon
时间:
2003-4-1 02:34
你的代码里是否有未声明变量就用的情况?有就先声明再用。
作者:
竹笛
时间:
2003-4-1 02:53
先编译一次,系统将会提示您的错误所在位置。
作者:
china-girl
时间:
2003-4-1 03:19
我的出错窗体的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
作者:
竹笛
时间:
2003-4-1 03:25
Private Sub Command47_Click()
On Error GoTo Err_Command6_Click
改为:
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click
我看到了一处,有没有其它的我没细看,眼花:)
作者:
竹笛
时间:
2003-4-1 03:27
Private Sub Command45_Click()
On Error GoTo Err_Command6_Click
包括程序尾部:
Exit_Command6_Click:
Exit Sub
作者:
china-girl
时间:
2003-4-1 04:06
谢谢!已经可以了.不过,好象2000不能访问97的MDE文件!WHY?
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3