| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1575 人关注过本帖
标题:[求助]关于fpSpread的问题
取消只看楼主 加入收藏
terry_vicky
Rank: 1
等 级:新手上路
帖 子:70
专家分:0
注 册:2006-12-15
收藏
 问题点数:0 回复次数:4 
[求助]关于fpSpread的问题
为什么在我的程序代码里fpSpread显示未定义,怎么定义这个变量,另外是什么意思
搜索更多相关主题的帖子: fpSpread 
2006-12-27 16:20
terry_vicky
Rank: 1
等 级:新手上路
帖 子:70
专家分:0
注 册:2006-12-15
收藏
得分:0 

这个程序是别人作过的我拿来用不好用了,你能帮我看看么


Option Explicit

Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Long
hNameMappings As Long
lpszprogressTitle As String
End Type

Private Declare Function SHFileOperation Lib _
"shell32" _
(lpFileOp As SHFILEOPSTRUCT) As Long
Private Declare Function GetWindowsDirectory _
Lib "kernel32" Alias "GetWindowsDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As _
Long) As Long

Const FO_COPY = &H2
Const FO_DELETE = &H3
Const FO_MOVE = &H1
Const FO_RENAME = &H4
Const FOF_ALLOWUNDO = &H40
Const FOF_NOCONFIRMATION = &H10
Const FOF_NOCONFIRMMKDIR = &H200

Dim MustSave As Boolean
Dim aa As String
Dim cnDB As Connection
Dim Rs As Recordset
Dim Rs1 As Recordset
Dim fpSpread1 As String

Private Sub Command1_Click()
Unload Me

End Sub

Private Sub Form_Load()
MustSave = False

Set cnDB = New Connection
cnDB.Open ConString

fpSpread1.Row = -1
fpSpread1.Col = -1
fpSpread1.DAutoHeadings = False
fpSpread1.CellType = 1
fpSpread1.TypeMaxEditLen = 225

Set Rs = New Recordset
Set Rs1 = New Recordset
Rs.Open "Select * from bm", cnDB, adOpenStatic, adLockOptimistic
Set fpSpread1.DataSource = Rs
'fpSpread1.MaxRows = fpSpread1.DataRowCnt
fpSpread1.DAutoSizeCols = 0

fpSpread1.Col = 1
fpSpread1.Row = SpreadHeader
fpSpread1.Text = "部门"

If Rs.RecordCount > 0 Then
Rs.MoveFirst
aa = Rs.Fields(0)
Else
aa = ""
End If
Rs1.Open "Select * from bm where name='" & aa & "'", cnDB, adOpenStatic, adLockOptimistic

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Unload MyDialog

End Sub
Private Sub fpSpread1_EditChange(ByVal Col As Long, ByVal Row As Long)
MustSave = False
End Sub

Private Sub nowDelete_Click()
If Rs.RecordCount > 0 Then
DeleteForm.Label3.Caption = Rs.Fields(0).Value
DeleteForm.Lable4.Caption = "weihu1"
DeleteForm.Show
End If
End Sub

Public Sub RefreshDate_Click()
cnDB.Close
cnDB.Open ConString
Rs.Open "Select * from bm", cnDB, adOpenStatic, adLockOptimistic
If Rs.RecordCount > 0 Then
aa = Rs.Fields(0)
Else
aa = ""
End If
Rs1.Open "Select * from bm where name='" & aa & "'", cnDB, adOpenStatic, adLockOptimistic
Set fpSpread1.DataSource = Rs
fpSpread1.MaxRows = fpSpread1.DateRowCnt
End Sub

2006-12-27 16:29
terry_vicky
Rank: 1
等 级:新手上路
帖 子:70
专家分:0
注 册:2006-12-15
收藏
得分:0 
没有这句话Dim fpSpread1 As String,这举话是我后加的忘注释了
2006-12-27 16:34
terry_vicky
Rank: 1
等 级:新手上路
帖 子:70
专家分:0
注 册:2006-12-15
收藏
得分:0 

不好意思,我不知道怎么才能解决这个问题啊

2006-12-27 16:39
terry_vicky
Rank: 1
等 级:新手上路
帖 子:70
专家分:0
注 册:2006-12-15
收藏
得分:0 
我实在是不知道怎么办了啊,谁能帮我看看啊,谢谢
请问这个还用引用么
2006-12-27 17:02
快速回复:[求助]关于fpSpread的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025912 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved