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 AnyDate As Variant) As String
   SQLDate = "#" & Format(AnyDate, "mm/dd/yyyy") & "#"
End Function

Further information in the Microsoft Knowledge Base: Q149095 ACC


Hints & tips

The textbox class in Visual FoxPro 9 has a new Autocomplete property which shows the user the previous values that have been entered in that textbox.
Autocomplete in VFP 9

Your Access database will look more impressive if you add custom toolbars...
Custom toolbars

FoxPro has always had functions to read and write files at a low level...
Foxpro low level file functions

More...
More pages of hints and tips for users of Microsoft FoxPro and Access databases.

Site Map