asns
asked on
please amend this code
Hi,
the following code gives me this error: "Object variable or with block variable not set "
Private Sub Form_Load()
Dim SsqlD As String
SsqlD = "DELETE * FROM Table1”
Me.Adodc1.LockType = adLockOptimistic
Me.Adodc1.Recordset.Source . = SsqlD
please help by amending this code
asns
the following code gives me this error: "Object variable or with block variable not set "
Private Sub Form_Load()
Dim SsqlD As String
SsqlD = "DELETE * FROM Table1”
Me.Adodc1.LockType = adLockOptimistic
Me.Adodc1.Recordset.Source
please help by amending this code
asns
sorry this line ..
Me.Adodc1.Recordset.Source . = SsqlD
should be..
Me.Adodc1.RecordSource = SsqlD
and then the refresh thing..
hope this helps
-priya
Me.Adodc1.Recordset.Source
should be..
Me.Adodc1.RecordSource = SsqlD
and then the refresh thing..
hope this helps
-priya
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have connection object
ConDb.Execute("DELETE * FROM Table1")
will do the needful.
ConDb.Execute("DELETE * FROM Table1")
will do the needful.
Private Sub Form_Load()
Dim SsqlD As String
SsqlD = "DELETE * FROM Table1”
Me.Adodc1.Recordset.Source
Me.Adodc1.Refresh
End sub
-priya