[AccessD] Recordset object transposes field order

Dan Waters dwaters at usinternet.com
Wed Jul 7 22:37:51 CDT 2004


Susan,

I would look at the listbox properties.  How many columns does it say should
be there?  Which column is bound?  Do any columns have their width set to 0?

Also, try creating a query to populate the listbox.  See if that gives the
same or different results.

You're using CurrentProject.Connection.  Is this an '02 or '03 mdb?

Do any of your lst variables actually start with the number one (1)?  They
sure are close.

Just stuff to look at . . .
Dan Waters

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Wednesday, July 07, 2004 5:42 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Recordset object transposes field order

I'm using a Recordset to populate a list box. When I open the form, the
CompanyName and CustomerID fields are transposed in the actual control --
anybody have any clue why? 
 
Susan H. 
 
 
Private Sub Form_Load()
  'Use Recordset as list box control
  'record source.
  Dim rst As ADODB.Recordset
  Dim lst As Access.ListBox
  Set rst = New ADODB.Recordset
  Set lst = lstPhone
  
  rst.Open "SELECT CustomerID, CompanyName, " & _
   "Phone, Fax FROM Customers", CurrentProject.Connection, _
   adOpenStatic, adLockPessimistic
  Set lst.Recordset = rst
End Sub
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list