ahmed_optom
Registered User.
- Local time
- Today, 09:04
- Joined
- Oct 27, 2016
- Messages
- 93
Im trying to delete a record from a table.
Currently gives a runtime 3061 error, Too few parameters, 1 expected.
Here is the offending code
sql = "DELETE * FROM [Diary] WHERE [ID]= Dlookup([ID],[Diary],[AppointmentDate]='#[me].[Text13]#' and [SlotNumber]=2)"
CurrentDb.Execute sql
Im trying to find the appointment in table "Diary", which has an ID, which is identified by finding a certain date stored in text13 and Slot number, in this case "2".
Any ideas?
Currently gives a runtime 3061 error, Too few parameters, 1 expected.
Here is the offending code
sql = "DELETE * FROM [Diary] WHERE [ID]= Dlookup([ID],[Diary],[AppointmentDate]='#[me].[Text13]#' and [SlotNumber]=2)"
CurrentDb.Execute sql
Im trying to find the appointment in table "Diary", which has an ID, which is identified by finding a certain date stored in text13 and Slot number, in this case "2".
Any ideas?