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 --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/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/