Let me put in my full process & code, and maybe that will help you to
understand better.

I created an ADO recordset (rst), using a SQL string that selects
TenantDisplayName and TenantDisplayName (in that order), and then set
the source of the listbox to it as below:

     Set lstListbox.Recordset = rst

The listbox control has Row Source Type set to Table/Query, Row Source
as blank (since I'm not assigning the SQL code to the listbox), Column
Count as 2, Bound Column as 1.

That does produce items in the listbox, with rows in the proper order
... but with columns out of sequence.

I apologize if I was unclear previous about how I was going about things.

Bryant




--- In AccessDevelopers@yahoogroups.com, "Hoffman, Tobi K \(DYS\)"
<[EMAIL PROTECTED]> wrote:
>
> Ah, it's the column order (your row sort was different in the two
> examples as well) -- look at the listbox Row Source and rearrange the
> column order there.  Click on the .. at the far right of the Row Source
> line in Properties; it will look like a query, and you can do the
> rearranging there.
> 
> Tobi
> 
> -----Original Message-----
> From: AccessDevelopers@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Databasedude.com
> Sent: Thursday, December 08, 2005 11:34 AM
> To: AccessDevelopers@yahoogroups.com
> Subject: [AccessDevelopers] Re: Field order reversed in listbox
> 
> 
> Wouldn't Order By address how the rows are sorted, not how the columns
> appear left-to-right?
> 
> Bryant
> 
> --- In AccessDevelopers@yahoogroups.com, "Hoffman, Tobi K \(DYS\)"
> <[EMAIL PROTECTED]> wrote:
> >
> > You need to fill in the Order By line in the Properties for the 
> > listbox, and/or add an "ORDER BY" clause in the query.  The listbox 
> > "Order By" will take precedence over the query order.
> > 
> > Tobi
> > 
> > 
> > -----Original Message-----
> > From: AccessDevelopers@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > Databasedude.com
> > Sent: Thursday, December 08, 2005 9:48 AM
> > To: AccessDevelopers@yahoogroups.com
> > Subject: [AccessDevelopers] Field order reversed in listbox
> > 
> > 
> > I am creating an ADO recordset and assigning it as the source of a 
> > listbox. However, the column order in the listbox is different from 
> > the query.
> > 
> > Here is the SQL statement:
> > 
> >     strSQL = "SELECT [TenantID], [TenantDisplayName] " _
> >         & "FROM qselTenantList_Temp " _
> >         & "WHERE TenantID = TenantID "
> > 
> > That produces this result:
> > 
> > TenantID     TenantDisplayName
> > --------     -----------------
> > ABC          The ABC Corporation
> > 123          Lotus Company
> > 
> > 
> > In the listbox, TenantDisplayName appears, followed by TenantID.
> > 
> > TenantDisplayname     TenantID
> > -----------------     --------
> > The ABC Corporation   ABC
> > Lotus Company         123
> > 
> > Any ideas why it would switch column order?
> > 
> > Thanks in advance,
> > Bryant
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Please zip all files prior to uploading to Files section.
> > Yahoo! Groups Links
> >
> 
> 
> 
> 
> 
> 
> 
> 
> Please zip all files prior to uploading to Files section. 
> Yahoo! Groups Links
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to