I want to delete a record from the table depending on the constant.
For example,if i want to delete the following numbers:
5,28,40,69
Then i put them in brackets as ” In ( 5,28,40,69) and then execute a delete query.
This i have done with the following code:
Public Const STrIn = ” In (5,28,40,69)”
Dim Bas As String
Bas = ” delete * from tblClients where Clientid ” & STrCl & “”
CurrentDb.Execute Bas
To my regret the code deletes all the records from the table and not just those in the constant.
How can i delete only the selected records ?
And also, what shall i do if a number from the constant is not existing?