andreihortua
Registered User.
- Local time
- Yesterday, 19:33
- Joined
- Sep 19, 2005
- Messages
- 12
I get an error message when i click a button says:
"Object Required"
This is the code:
strSQLPuertosCanales is defined outside of the procedure.
Private Sub cbAnexarATemporal_Click()
'Adds query result to a temp table to allow select more devices
On Error GoTo Err_cbAnexarATemporal_Click
Dim strSQLAnexar As String
CnsServiciosAfectados.RecordSource = strSQLPuertosCanales
strSQLAnexar = "INSERT INTO Temporal SELECT DISTINCT * FROM CnsServiciosAfectados;"
DoCmd.RunSQL strSQLAnexar
Exit_cbAnexarATemporal_Click:
Exit Sub
Err_cbAnexarATemporal_Click:
MsgBox Err.Description
Resume Exit_cbAnexarATemporal_Click
End Sub
"Object Required"
This is the code:
strSQLPuertosCanales is defined outside of the procedure.
Private Sub cbAnexarATemporal_Click()
'Adds query result to a temp table to allow select more devices
On Error GoTo Err_cbAnexarATemporal_Click
Dim strSQLAnexar As String
CnsServiciosAfectados.RecordSource = strSQLPuertosCanales
strSQLAnexar = "INSERT INTO Temporal SELECT DISTINCT * FROM CnsServiciosAfectados;"
DoCmd.RunSQL strSQLAnexar
Exit_cbAnexarATemporal_Click:
Exit Sub
Err_cbAnexarATemporal_Click:
MsgBox Err.Description
Resume Exit_cbAnexarATemporal_Click
End Sub
Last edited: