Results 1 to 2 of 2
Thread: delete function (access 2000)
2002-05-28, 17:35 #1
- Join Date
- Jan 2001
- Thanked 0 Times in 0 Posts
delete function (access 2000)
I seem to have a very old function for deleting my orders in the table Orders.
I am afraid this function works nor more and i would like to ask can somebody suggest me a simplified and up to date code for deleting my orders by clicking the OrderID control on a form.
My function is the following:
PublicFunction DeleteOrders(ByVal strTableName As String,ByVal strWhere AsString)
Dim strSQL AsString
StrSQL = "DELETE * FROM (" strTableName & ") " & WHERE " & strWhere & ""
and then i used to call the function like this:
DeleteOrders" orders", "orders.orderid = " & Screen.ActiveControl.Value
But then i receive he following message:
Run time error 3320 :
Function is not available in expressions in table-level validation expression.
Can somebody help me in rewriting my function?
2002-05-29, 03:11 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: delete function (access 2000)
StrSQL = "DELETE * FROM " & strTableName & " WHERE " & strWhereCharlotte