PC Review


Reply
Thread Tools Rate Thread

Array by getrows to listbox - date format problem

 
 
kalle
Guest
Posts: n/a
 
      20th Jul 2010
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem exporting with long strings to Excel using getrows and an array Mark Microsoft Access 2 11th Apr 2007 10:39 AM
Subscript out of range on an array = recordset.GetRows Azzna Microsoft Access Form Coding 3 8th Feb 2007 10:50 PM
Date Format in a ListBox Armando Vargas Microsoft Access ADP SQL Server 0 5th Dec 2005 11:27 PM
Getrows array =?Utf-8?B?amFuZXRi?= Microsoft Access VBA Modules 3 4th Apr 2005 08:37 PM
Re: Can't assign to Array .GetRows in Excel 97 =?Utf-8?B?TGVubg==?= Microsoft Excel Programming 0 24th Jun 2004 02:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:35 PM.