Date formats used by Access SQL

Regardless of the regional settings of your PC, you must provide dates in US format for SQL statements in VBA. Use the following simple function to convert a UK date into a US-format date:

Function SQLDate (ByVal MyDate As Variant) As String
   SQLDate = "#" & Format(MyDate,"mm/dd/yyyy") & "#"
End Function

Further information in the Microsoft Knowledge Base: Q149095 ACC

Related Items

Scope of a FoxPro command

Scope of a FoxPro command

Using While and For to control the scope of a FoxPro command

Read More

Full outer join in Access

Creating a full outer join in Access SQL

Read More

Types of SQL join

Types of join in a SQL query

Read More

FoxPro cursors

FoxPro cursors

Using cursors in FoxPro

Read More

Using a FoxPro cursor in a combo box

Using a cursor to fill a combo box or list box in FoxPro

Read More