|
表中的文本字段内容如何转换成Form类型
各位老大,小弟碰到一个问题,想请教一下
做了个模块定义了三个变量,frmcaption as string,sFormName as Form,args as string
Function OpenAform (FrmCaption As String, sFormName As Form, args As String)
我在控制面板上调用这个模块以便打开窗体代码如下
Dim conn As ADODB.Connection
Set conn = CurrentProject.Connection
Dim sst As New ADODB.Recordset
Dim i As Integer
Dim sstsql As String
Dim strCARGOTYPE_NO As String
strCARGOTYPE_NO = Right(Node.Key, Len(Node.Key) - 3)
'MsgBox strCARGOTYPE_NO
sstsql = "SELECT * from Tbl_FormName WHERE Tbl_FormName.Code='" & strCARGOTYPE_NO & "' order by Tbl_FormName.Code ,Tbl_FormName.Level;"
'On Error Resume Next
sst.Open sstsql, conn, adOpenKeyset, adLockOptimistic
………
OpenAform Node.Text, sst!FormName, sst!sVALUE 调用的模块
…………
调用的时候提示"类型不匹配"
sst!formname是表中的文本字段
我该如何改正,请各位老大帮忙,谢谢 |
|