Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Array by getrows to listbox - date format problem

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date format in a listbox Jac Tremblay[_4_] Excel Programming 5 October 3rd 08 03:05 AM
Array to Populate ListBox Problem pallaver Excel Discussion (Misc queries) 1 July 25th 08 08:50 AM
Date Format in a Userform Listbox Deke Excel Programming 1 February 21st 07 01:58 PM
Can't assign to Array .GetRows in Excel 97 Lenn Excel Programming 2 June 24th 04 02:30 AM
Can't assign to Array .GetRows in Excel 97 Lenn Excel Programming 0 June 24th 04 12:58 AM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"