David and Joanne Gould
dajomigo at dgsolutions.net.au
Tue Oct 9 20:21:45 CDT 2007
Thank you Charlotte and Susan Sorry to take so long to reply. It just took me a long time to figure out where to put the code. For anyone who has been interested in the result of this - I put the following code in the after update event of the controlling combo box after requerying the target combo box. TargetComboBox = TargetComboBox.ItemData(0) Once again thanks for all your help with this. David At 09:22 AM 10/10/2007, you wrote: >The simple express is ItemData(0) unless you have turned on column >headings in the dropdown and then it's ItemData(1), since zero is the >heading row. > >Charlotte Foust > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins >Sent: Tuesday, October 09, 2007 11:11 AM >To: Access Developers discussion and problem solving >Subject: Re: [AccessD] Combo box default value > >The query sorts by most often chosen? That's interesting -- so the most >often chosen should be the top item in the combo right? If that's the >case, you simply set the default value to the first item -- there's a >simple expression for doing so that I can't recall off the top of my >head -- someone's going to know it -- > >control.Data(0) > >or something like that. > >Susan H. > > > > Steve > > > > The combo box is based on a query that lists departure points for a > > tour bus based on the postcode of the client. It lists the options by > > most popular to least popular. At the moment it starts off with a > > blank text box and I want it to show the most popular as a default. > > The combo works fine as far as listing the options in the right order > > - just leaves it blank until a choice is made. > >-- >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 > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.488 / Virus Database: 269.14.6/1060 - Release Date: >9/10/2007 4:43 PM