I have a function that cuts off dates that works well. I want however to imrpove the function allowing the user to add on dates through a table and a form.The new form is called FrmUpdates anf the control CutDate.
Instead of using the constant CutDate i want to use the control CutDate like that :
Dim CutDate As String
Set CutDate = > FrmCutdates![CutDate]
I have 2 questions.First, somehow Acces does not accept my line
Set CutDate > FrmCutdates![CutDate]
Second, the date in the control shows the reverse date, for example
instead of 06.30.2003 it shows 30.06.2003
How can i correct them ?
Below is my working function
Public Const CutDate As String = " WHERE ((([orders].[orderdate])>#06/30/2003#));"
Public Function CutOff()
Dim SqlRemoveFromOrders As String
SqlRemoveFromOrders = "DELETE DISTINCTROW orderdate FROM orders "
CurrentDb.Execute SqlRemoveFromOrders & CutDate
End Function
Instead of using the constant CutDate i want to use the control CutDate like that :
Dim CutDate As String
Set CutDate = > FrmCutdates![CutDate]
I have 2 questions.First, somehow Acces does not accept my line
Set CutDate > FrmCutdates![CutDate]
Second, the date in the control shows the reverse date, for example
instead of 06.30.2003 it shows 30.06.2003
How can i correct them ?
Below is my working function
Public Const CutDate As String = " WHERE ((([orders].[orderdate])>#06/30/2003#));"
Public Function CutOff()
Dim SqlRemoveFromOrders As String
SqlRemoveFromOrders = "DELETE DISTINCTROW orderdate FROM orders "
CurrentDb.Execute SqlRemoveFromOrders & CutDate
End Function