The main table in my database is imported from an excel table. All fields are TEXT fields.
My continuous form has a column called RevDate and I'd like to have a button to sort the form by this field. Most of the time, the date is in a format yyyy-mm-dd. So using this simple code requires no conversion and works very well.
Me.OrderBy = "[RevDate] DESC"
However, sometimes, the format is mm-dd-yyyy.
Is there any way to use VBA to sort this text field in either format?
My continuous form has a column called RevDate and I'd like to have a button to sort the form by this field. Most of the time, the date is in a format yyyy-mm-dd. So using this simple code requires no conversion and works very well.
Me.OrderBy = "[RevDate] DESC"
However, sometimes, the format is mm-dd-yyyy.
Is there any way to use VBA to sort this text field in either format?