(i'm totally clueless when it comes to vb) i'm getting "compile error invalid use of property"
with the error
[CODE=vb]
Private Sub cmdDelete_Click () (at here)
Dim db1 As ADODB.Command
db1 = New ADODB.Command
db1.ActiveConne ctio n = "A:\db1.mdb "
db1.CommandType = adCmdText
db1.CommandText = "delete * from order where orderid=" & txtOrder.Text
db1.Execute
End With
End Sub
[/CODE]
all i am trying to is is when i enter in a order id (shown in the pic) and click on delete it goes into the database find the id and the row of information and deletes it and i'm getting nowhere with the code , if i've gone totally from can some explain to me how i could do this please?
with the error
[CODE=vb]
Private Sub cmdDelete_Click () (at here)
Dim db1 As ADODB.Command
db1 = New ADODB.Command
db1.ActiveConne ctio n = "A:\db1.mdb "
db1.CommandType = adCmdText
db1.CommandText = "delete * from order where orderid=" & txtOrder.Text
db1.Execute
End With
End Sub
[/CODE]
all i am trying to is is when i enter in a order id (shown in the pic) and click on delete it goes into the database find the id and the row of information and deletes it and i'm getting nowhere with the code , if i've gone totally from can some explain to me how i could do this please?
Comment