J
James Gaylord via AccessMonster.com
OK so why do I get a Type mismatch on the openform line?
Private Sub butOpenForm_Click()
Dim stData As String
Dim stWhere As String
' On Error GoTo butOpenForm_Click_Error
txtType = Me.cmbRulesType
txtTable = Me.lstRulesTableName
stInputs = Me.cmbInputs
blnEditForm = chkEditForm
If chkEditForm = True Then
stData = "acFormEdit"
stWhere = "[Rules Table Name] = " & "'" & txtTable & "'"
Else
stData = "acFormAdd"
End If
DoCmd.OpenForm "frm:2000 Rules Table Detail", acFormDS, , stWhere, stData,
OpenArgs:=stInputs & ";" & txtType & ";" & txtTable & ";" & blnEditForm
On Error GoTo 0
Exit Sub
butOpenForm_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
butOpenForm_Click of VBA Document Form_frm:2000RulesTableFilter"
End Sub
It was working fine before I added the where cluase. I double checked my
syntax on that and it looks fine. This clause is passing a string of data,
in this case FABCOL
TIA
--
James B Gaylord
From the Wolf Comes the Strength of the Pack
From the Pack Comes the Strength of the Wolf
- R Kipling
Message posted via AccessMonster.com
Private Sub butOpenForm_Click()
Dim stData As String
Dim stWhere As String
' On Error GoTo butOpenForm_Click_Error
txtType = Me.cmbRulesType
txtTable = Me.lstRulesTableName
stInputs = Me.cmbInputs
blnEditForm = chkEditForm
If chkEditForm = True Then
stData = "acFormEdit"
stWhere = "[Rules Table Name] = " & "'" & txtTable & "'"
Else
stData = "acFormAdd"
End If
DoCmd.OpenForm "frm:2000 Rules Table Detail", acFormDS, , stWhere, stData,
OpenArgs:=stInputs & ";" & txtType & ";" & txtTable & ";" & blnEditForm
On Error GoTo 0
Exit Sub
butOpenForm_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
butOpenForm_Click of VBA Document Form_frm:2000RulesTableFilter"
End Sub
It was working fine before I added the where cluase. I double checked my
syntax on that and it looks fine. This clause is passing a string of data,
in this case FABCOL
TIA
--
James B Gaylord
From the Wolf Comes the Strength of the Pack
From the Pack Comes the Strength of the Wolf
- R Kipling
Message posted via AccessMonster.com