注册 登录
Office中国论坛/Access中国论坛 返回首页

叶海峰的个人空间 http://www.office-cn.net/?42510 [收藏] [复制] [分享] [RSS]

日志

水晶易表FS传参给Access进行操作

热度 1已有 1964 次阅读2012-11-15 08:52 |个人分类:水晶易表| 水晶易表, access通信

水晶易表其中一个数据连接方式:FS命令,这个FS命令其实就是Flash本身的FS命令功能,通过此功能,开发者可以把每个动作设置一个参数返回,然后ShockWave控件的FS_Command事件就能接收到这个参数,继而进行相应的事件代码操作,实现SWF文件和其他软件进行交互。

窗体示例1的代码:
Private Sub ShockwaveFlash0_FSCommand(ByVal command As String, ByVal args As String)
    Dim a
‘args水晶易表设置的参数返回的一个指定值
    a = Split(args, "|")
    If command = "A" Then’command,水晶易表设置的参数名称
        If args <> "全部" Then
            Me.表1_子窗体.Form.RecordSource = "select * from 表1 where 地区='" & args & "'"
        Else
            Me.表1_子窗体.Form.RecordSource = "select * from 表1"
        End If
    ElseIf command = "B" Then

        Me.表1_子窗体.Form.RecordSource = "select * from 表1 where 地区='" & a(0) & "' and 月份 ='" & a(1) & "'"
    ElseIf command = "edit" Then

       CurrentDb.Execute "Update 表1 set 销售额=" & a(2) & " where 地区='" & a(0) & "' and 月份='" & a(1) & "'"
        Me.表1_子窗体.Requery
    End If

End Sub
 
图片

发表评论 评论 (1 个评论)

回复 tmtony 2012-11-20 09:40
谢谢分享!水晶易表让Access增色不少

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-7 07:48 , Processed in 0.087623 second(s), 18 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部