Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am retrieving data into a list box from an Access database with,
essentially, the following code : Dim dbReports As DAO.Recordset Dim avRows As Variant : Set dbReports = gdbEmissions.OpenRecordset(sQuery) 'update list box With Me.lbxSite .Clear If dbReports.RecordCount 0 Then avRows = dbReports.GetRows(mlNumRecords) .List = Application.WorksheetFunction.Transpose(avRows) End If .ListIndex = -1 End With : Five columns of data are shown, including one column that contains date data. Everything is fine EXCEPT that the date format is dependent upon how the display form is run. If I start with a front-end form that calls the display form, then the date format is MM/DD/YYYY, contrary to the regional setting If I start the display form from within the VBA environment then the date format is DD/MM/YYYY - which is the desired format, and also the regional setting Why is there a difference, and can I force Excel to use the regional setting ? Regards Kevin Beckham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting the date format | Excel Discussion (Misc queries) | |||
Date format in permanent list | Excel Discussion (Misc queries) | |||
How keep date format from excel to merged list | New Users to Excel | |||
How do I create list validation from code without the text being converted into date format? | Excel Programming | |||
VBA Setting .Value to a date does not respect local system setting | Excel Programming |