0

i takes the current date value and then save it to text1.text

Text1.Text = Format(Now, "m/dd/yyyy")

then i am passing Text1.Text which actually contains date to Sql String which Delets all record that matches the Expiry date.. if current date = expiry date then delete that record..

strSQL = "DELETE * FROM Product WHERE Expiry_Date = '" & Text1.Text & "'"

but it gives error incorrect syntax near the keyword * and some time incorrect syntax near the keyword Delete

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Agent-of-Chaos
0

* is not required in delete statement. use this

strSQL = "DELETE FROM Product WHERE Expiry_Date = '" & Text1.Text & "'"

0

Thanks Friends...this problem is solved ....... i have now one more problem see my new thread please please please.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.