[AccessD] OT - Visual Basic DataCombo Control, Displaying First Item In List

Paul Hartland (ISHARP) paul.hartland at isharp.co.uk
Thu Nov 17 10:37:37 CST 2005


Thanks Charlotte, will try a bit later on or early tomorrow...

Paul 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: 17 November 2005 16:27
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] OT - Visual Basic DataCombo Control,Displaying First
Item In List

What you want is something like MyCombo = MyCombo.ItemData(0)

Note that if you have column headings turned on, you need to use
ItemData(1) because the column headings are treated as the first row.

Charlotte Foust


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland
(ISHARP)
Sent: Thursday, November 17, 2005 2:41 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] OT - Visual Basic DataCombo Control,Displaying First Item
In List


To all,

I have a DataCombo control which will vary with the number of records
contained inside it depending on what account number of a particular client
is selected, but I can seem to set it up to display the first item in a list
when the recordset of the DataCombo box is returned..

I did think about using a recordset variable to get the clone of the
recordset and return the first item that way, but this seems long winded and
surely there must be a cleaner more effective way.

Thanks in advance to anyone that can help on this or supply sample code etc.

Paul Hartland
Database Developer.

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
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