K
kalle
Hi Group,
As a newbie I try to develop a form where the user can build a SQL-
query. By browsing this group I have
learnt a lot. The result of the user built query is a recordset with 1
to 9 fields. One or more fields has date
formats like "yyyy-mm-dd". As the fields, depending on the users
choice, may be in different order I use the
Getrows method to get an array for passing to a listbox. The trouble
is that the date fields shows up in the
listbox with the format "mm/dd/yyyy". I now that this problem may be
solved by passing the array by additem
method to the listbox. But is there a way to change the format of the
dates and still using the getrows method.
The code below is used to pass the array to the listbox.
Some hints would be valuable.
Brgds
CG Rosen
---------------------------------------------------------------------------------------------------------------
rsData.Open szSQL, ConnString, adOpenKeyset
rcArray = rsData.GetRows
With UserForm1.ListBox1
..Clear
..ColumnCount = -1
..Column = rcArray
..ListIndex = -1
End With
As a newbie I try to develop a form where the user can build a SQL-
query. By browsing this group I have
learnt a lot. The result of the user built query is a recordset with 1
to 9 fields. One or more fields has date
formats like "yyyy-mm-dd". As the fields, depending on the users
choice, may be in different order I use the
Getrows method to get an array for passing to a listbox. The trouble
is that the date fields shows up in the
listbox with the format "mm/dd/yyyy". I now that this problem may be
solved by passing the array by additem
method to the listbox. But is there a way to change the format of the
dates and still using the getrows method.
The code below is used to pass the array to the listbox.
Some hints would be valuable.
Brgds
CG Rosen
---------------------------------------------------------------------------------------------------------------
rsData.Open szSQL, ConnString, adOpenKeyset
rcArray = rsData.GetRows
With UserForm1.ListBox1
..Clear
..ColumnCount = -1
..Column = rcArray
..ListIndex = -1
End With