水晶易表其中一個(gè)數(shù)據(jù)連接方式:FS命令,這個(gè)FS命令其實(shí)就是Flash本身的FS命令功能,通過(guò)此功能,開(kāi)發(fā)者可以把每個(gè)動(dòng)作設(shè)置一個(gè)參數(shù)返回,然后ShockWave控件的FS_Command事件就能接收到這個(gè)參數(shù),繼而進(jìn)行相應(yīng)的事件代碼操作,實(shí)現(xiàn)SWF文件和其他軟件進(jìn)行交互。
窗體示例1的代碼:
Private Sub ShockwaveFlash0_FSCommand(ByVal command As String, ByVal args As String)
Dim a
‘a(chǎn)rgs水晶易表設(shè)置的參數(shù)返回的一個(gè)指定值
a = Split(args, "|")
If command = "A" Then’command,水晶易表設(shè)置的參數(shù)名稱
If args <> "全部" Then
Me.表1_子窗體.Form.RecordSource = "select * from 表1 where 地區(qū)='" & args & "'"
Else
Me.表1_子窗體.Form.RecordSource = "select * from 表1"
End If
ElseIf command = "B" Then
Me.表1_子窗體.Form.RecordSource = "select * from 表1 where 地區(qū)='" & a(0) & "' and 月份 ='" & a(1) & "'"
ElseIf command = "edit" Then
CurrentDb.Execute "Update 表1 set 銷售額=" & a(2) & " where 地區(qū)='" & a(0) & "' and 月份='" & a(1) & "'"
Me.表1_子窗體.Requery
End If
End Sub
