Hello,
i am starting to give up :( search the forum and tried to correct my mistakes - but no luck. Does anyone have a clue what i am doing wrong?
I have a form and subform.
I have a button on my form to delete exact record and all related records on subform, but i get date type mismatch criteria error while i am trying to run Sql. The delete criteria is based on two values - one is Text value and another is Date. I tested the delete criteria only with text value everything is working fine, so i am trying to work with Date field. Heres my SQL:
this one pops up the error msg :( :
This one is ok:
Things_ID - text
I need to combine those two sql in one sql but something wrong with date type sql
Can anyone help me?
i am starting to give up :( search the forum and tried to correct my mistakes - but no luck. Does anyone have a clue what i am doing wrong?
I have a form and subform.
I have a button on my form to delete exact record and all related records on subform, but i get date type mismatch criteria error while i am trying to run Sql. The delete criteria is based on two values - one is Text value and another is Date. I tested the delete criteria only with text value everything is working fine, so i am trying to work with Date field. Heres my SQL:
this one pops up the error msg :( :
Code:
strSQL = "Delete * From tblThings Where [tblThings].[Order_date]= #" & Me![Order_date] & #" ;" DoCmd.RunSQL strSQL
Things_ID - text
Code:
strSQL = "Delete * From tblThings Where [tblThings].[Things_ID]='" & Me![Things_ID] & " ';"
Can anyone help me?
Comment