Combo Box Sorting Problem

Hello experts,

My report deals with data for wells.  I have a combo box where the user will 
choose the name of the well, then it will display the appropriate report.  It 
works great.  However, the list in teh combo box shows as follows:

paramount 1
denver
Atlas
Bailey 1
Bailey 5
Bell 10
Bell 12
Bell 14
Bell 17
Bell 2
Bell 5
Bell 6
Borie 1
BELMOT 1
BELMOT 12
BELMOT 2
BELMOT 3

Obviously, the issues are:  upper/lower case not consistent; the numbers 
next to names are not sorted properly.

Is there a code that would allow no case sensitivity and sort names with 
numbers appropriately?  

I am using 2007, but have access to 2003.
 
Thank you so much for your help.
- 
MB
0
Utf
9/25/2007 7:58:10 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
636 Views

Similar Articles

[PageSpeed] 7

>> the numbers next to names are not sorted properly.
You need to add a space or a zero to those like this --
Bell 02
Bell 05
Bell 06
to match 
Bell 11

>>upper/lower case not consistent
Use a calculated field for sorting like this ---
   MySort: UCase([YourField])

-- 
KARL DEWEY
Build a little - Test a little


"MB" wrote:

> Hello experts,
> 
> My report deals with data for wells.  I have a combo box where the user will 
> choose the name of the well, then it will display the appropriate report.  It 
> works great.  However, the list in teh combo box shows as follows:
> 
> paramount 1
> denver
> Atlas
> Bailey 1
> Bailey 5
> Bell 10
> Bell 12
> Bell 14
> Bell 17
> Bell 2
> Bell 5
> Bell 6
> Borie 1
> BELMOT 1
> BELMOT 12
> BELMOT 2
> BELMOT 3
> 
> Obviously, the issues are:  upper/lower case not consistent; the numbers 
> next to names are not sorted properly.
> 
> Is there a code that would allow no case sensitivity and sort names with 
> numbers appropriately?  
> 
> I am using 2007, but have access to 2003.
>  
> Thank you so much for your help.
> - 
> MB
0
Utf
9/25/2007 8:10:04 PM
Thank you, Karl, for answering so quickly!  It works!  Much appreciated!
-- 
MB


"KARL DEWEY" wrote:

> >> the numbers next to names are not sorted properly.
> You need to add a space or a zero to those like this --
> Bell 02
> Bell 05
> Bell 06
> to match 
> Bell 11
> 
> >>upper/lower case not consistent
> Use a calculated field for sorting like this ---
>    MySort: UCase([YourField])
> 
> -- 
> KARL DEWEY
> Build a little - Test a little
> 
> 
> "MB" wrote:
> 
> > Hello experts,
> > 
> > My report deals with data for wells.  I have a combo box where the user will 
> > choose the name of the well, then it will display the appropriate report.  It 
> > works great.  However, the list in teh combo box shows as follows:
> > 
> > paramount 1
> > denver
> > Atlas
> > Bailey 1
> > Bailey 5
> > Bell 10
> > Bell 12
> > Bell 14
> > Bell 17
> > Bell 2
> > Bell 5
> > Bell 6
> > Borie 1
> > BELMOT 1
> > BELMOT 12
> > BELMOT 2
> > BELMOT 3
> > 
> > Obviously, the issues are:  upper/lower case not consistent; the numbers 
> > next to names are not sorted properly.
> > 
> > Is there a code that would allow no case sensitivity and sort names with 
> > numbers appropriately?  
> > 
> > I am using 2007, but have access to 2003.
> >  
> > Thank you so much for your help.
> > - 
> > MB
0
Utf
9/25/2007 8:14:01 PM
Use something like the following as the row source for the combo box. Watch 
out for word wrapping below.

SELECT Wells.Wells
FROM Wells
ORDER BY UCase(IIf(InStr([Wells]," ")>0, Left([Wells], InStr([Wells]," 
")-1), [Wells])), IIf(InStr([Wells]," ")>0, Val(Mid([Wells], InStr([Wells]," 
"))), 0);
-- 
Jerry Whittle, Microsoft Access MVP 
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"MB" wrote:

> Hello experts,
> 
> My report deals with data for wells.  I have a combo box where the user will 
> choose the name of the well, then it will display the appropriate report.  It 
> works great.  However, the list in teh combo box shows as follows:
> 
> paramount 1
> denver
> Atlas
> Bailey 1
> Bailey 5
> Bell 10
> Bell 12
> Bell 14
> Bell 17
> Bell 2
> Bell 5
> Bell 6
> Borie 1
> BELMOT 1
> BELMOT 12
> BELMOT 2
> BELMOT 3
> 
> Obviously, the issues are:  upper/lower case not consistent; the numbers 
> next to names are not sorted properly.
> 
> Is there a code that would allow no case sensitivity and sort names with 
> numbers appropriately?  
> 
> I am using 2007, but have access to 2003.
>  
> Thank you so much for your help.
> - 
> MB
0
Utf
9/25/2007 8:26:00 PM
Reply:

Similar Artilces:

i have problem ceating report for crm 3.0
i have problem finding the relationship between crm 3.0 database, like i shoud retreive data from Filtered view but not all data is displaying correctly as shown in the crystal report we back up from CRM 1.2 before upgrading to 3.0 ofcourse sql reporting services does not help me choosing the correct tables/ views i should choosed from CRM 3.0 DB the SDK 3.0 prefer working on XML m really stuck what should i do exactly? any help!! Can you give example what kind of report you try to create? Also what operations you are trying to do in CRM 3.0 SDK? -pongh "Samar" <Samar@dis...

List box
I am trying to use the list box function from the control toolbar. I am not sure how to get the listings I want in the list box. Is there certain VB coding that is needed? Any help will be appreciated. Thanks. Todd No VBA code needed. In Design mode, click on your list box and select Properties from the Control toolbox (or right-click your list box and select Properties), then scroll down to the ListFillRange Property and indicate the cell range address that has the items you want to appear in the box (i.e., A1:A10). Then exit out of design mode and test your list box. MRO "Tod...

Problem upgrade from Mscrm 1.2 to 3.0
At the end of the upgrade i got this error message Failed to locate the Reporting Services Report Server configuration file. Verify the file specified in registry value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Reporting Services[RSConfigFilePath] Does anyone know what wrong? Thanks Mathias ...

how do i view different mail boxes
I have set up different email accounts in outlook 2000. How do I choose which mail box I view when I go to outlook? btoonhoule <btoonhoule@discussions.microsoft.com> wrote: > I have set up different email accounts in outlook 2000. How do I > choose which mail box I view when I go to outlook? Using IMO or C/W mode? -- Brian Tillman ...

Currency exchange rate problem
hi, i am using MS Money2006. my default currency is set to ?. one of my account is in different currency. the problem is it does not calculate the current value of that account in ? using the current exchange rate. it takes the older and the same exchange rate. where can i change the setting so that it always takes the actual current exchange rate? rnv ...

POP3 Commands Problem-Urgent Help Require
Dear All, i have some questions regarding POP3, i want to know :- 1- why i am using TELNET on POP3 Port ? & what is the usefule if its display infront of me that ( +OK POP3 Server Ready. ) or ( +OK POP3 localhost v2001.78rh server ready ) ? is that mean the POP3 Protocol working on the server which i am telnet on it ? if yes , it means that i am have no problem on the Protocol POP3 ? is that right? 2-how many versions for POP3 ? & how i know the version which i am using or working with it ? and is there any special command for each version ? i mean i know the following cam...

Concatenate Multi-Select List Box Items
I need to use the chosen items in a multi-select List Box as concatenated text in another control on a subform. This text will be part of a large amount of concatenated text. How do I do this? I did find info here about using such items in a query but it was way over my head and I couldn't figure out how to convert that idea to this issue so please don't just refer me to that w/o some other explanation for this novice. For example, if the user selects: Frt Bumper, Grille, & Headlamp in the List Box, I want to then somehow concatenate those selections into a sente...

Filtering a combo box using a combo box
All, I am trying to filter the records from a table displayed in a combo box using a combo box on the same form. I built a query and set the criteria as Me![FormName]![Combo_box]. This allowed me to filter the list, but it did not do exactly what I wanted. When the first combo box is blank, the second one is also blank. Is there anyway I can get the second combo box to display all of the records when the first box is blank? Thank you for your help. Regards, John Try a criteria in the second combo of: Like Forms!YourFormName!Combo1Name & "*" -- Arvin Meyer, MCP, MVP http:/...

SubCalculate() Problem
I have added 1 new field DisPercent/Percentage/Text Box [tbDisPercent] I am trying to get / SubTotal * Dispercent = TotalAmount Public Sub SubCalculate() Dim dblSubTotal As Double, dblDisPercent As Double, dblTotalAmount As Double Dim dblWithoutDailyAmount As Double Dim dblMonthlyChargeAmount As Double, dblAdditionChargeAmount As Double Dim dblWithDailyChargeAmount1 As Currency, dblGSTOptionsValue As Double Dim dblWithDailyChargeAmount2 As Currency, dblWithDailyChargeAmount3 As Currency Dim dblWithDailyChargeAmount4 As Currency, dblWithDailyChargeAmount5 As Currency, dblW...

colour change of dated box
How can I change the colour of a dated box of excel after the date is over. I want the programme to read date automatically from pc and change colour. try Conditional Formatting In 2003: 1. Select the cells you want to format 2. Choose Format, Conditional Formatting 3. Choose Cell Value Is from the first drop down 3. Choose Formula is from the first drop down 4. Choose less than 5. In the third box, enter =TODAY() 6. Click the Format button 7. Choose a color on the Patterns tab (or any available option) 7. Click OK twice. -- Hope this is helpful Appreciate that you provide your feedbac...

Problems with Excel 2007 flickering & locking up
I am having problems with my excel 2007. Everytime I try to work on a file the screen flickers, columns disappear, when trying to save as the program locks up and the date seems to over lap. I was not having this problem until Windows updated about 3 weeks ago. I searched the problem on the web and found some postings that said I should uninstall the update for excel. I did this but it did not solve the problem. My computer is part of a company network and is runinng Windows XP Professional version 2002 service Pack 3 and My Office Software is 2007 Professional Plus. -- kjo...

Combo Box on Forms
Hi, I am using a combo box on a form that has several items w/ one being Other. If the user selects other I want them to be able to input what they want so that it will go into the table instead of just the "Other". I just am not really sure on how to do that. Can you help? Thanks, Jaime In design view click on VIEW - Properties and the the combo. Then change Limit To List to No. -- KARL DEWEY Build a little - Test a little "jseger22@yahoo.com" wrote: > Hi, > > I am using a combo box on a form that has several items w/ one being > Other. If the use...

sent box
how do i get the emails in the sent box to show sent to instead of sent from? -- deb deb wrote: > how do i get the emails in the sent box to show sent to instead of sent from? Add/remove whatever columns you want. Right-click on the header row and select Field Chooser. i may have not explained myself too well i dont want to sort by the "to" column i want the header on the email to show "to" not "from" i think the problem might be that this is not the default sent file, its just a folder named "sent" its for my boss, he ha...

Offline Synchronize problem
I am having trouble after closing or creating Z and ZZ reports. I am able to create the reports and close the terminal, however, after the task is completed, The 'Synchronize Offline Database' window appears and begins the process. After a few moments I receive an error: Run-Time Error '-2147217900 (80040e14)': [DBNETLIB] [ConnectionOpen (Connect()).] SQLServer Does not exist or access denied. Then my Store Operations terminates. I do have an Offline database created on Register 1 in the store and I am able to connect to it through RMS Administrator. I am running RMS ver...

Combo Boxes
Someone sent me an Excel document where each of the cells in I1:I312 are combo boxes. When you click off of those cells, the down arrow disappears. The list for the combo boxes are cells AA1 and AB1 (AA1 is New and AB1 is Existing). Please explain how this was done? Also, can you please tell me if it is possible to make New and Existing autocorrect entries. So even though the choices are New and Existing, if you hit N, New appears, and if you hit E, Existing appears. Thanks!! It sounds like Data|Validation. Take a look at Debra Dalgleish's site: http://www.contextures.com/xlDataVa...

Separator in combo box
hi, Is it possible to have a line separator in a combo box? I mean something like a separator in menus? thanks, Behzad Try :- http://www.codeproject.com/combobox/zsepcmb.asp http://www.codeproject.com/combobox/customcombo.asp -- Regards, Nish [VC++ MVP] http://www.voidnish.com /* MVP tips tricks and essays web site */ http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */ "behzad" <b@b.com> wrote in message news:%23fVB3em5EHA.3368@TK2MSFTNGP10.phx.gbl... > hi, > Is it possible to have a line separator in a combo box? I mean something > like...

XML load problem
hello, im using VBScript to open generated .XML files off the local file system and do stuff with them. the problem i'm running into is: sometimes the .XML is invalid and contains an ampersand that is not qualified. ex: <FOO>$.01 & Greater</FOO> ....which causes problems when i attempt to load via: Dim xml : Set xml = CreateObject("Microsoft.XMLDOM") xml.async = "false" If xml.load(sXmlPath) Then '[do stuff] Else '[report error] End If what can i do? is there a way get back an exac...

Edit box should support languages like japanese,chineese etc
Hi wht im trying to ask is.. 1. In my application, all the labels r in english only. 2.If i change the content of one text box in japanese or chineese language , [Text box value is the title for another dialog] 4.After i changed the content, i want the title to be displayed in japanese or chineese language. Note: I want only that text box to be changed ,,not the entire application.. so How can i able to support multibyte characters in MFC controls CEdit --text boxes.. Plz reply They do. You have to be in a Unicode app, and you have to have selected a Unicode font that has Chin...

corrupt pst file problem
I use Outlook 2002 with Internet Mail Only (IMO). My pst file is 540,944 bytes. When I use Outlook now, it is likely that my computer will crash with a blue screen.\ "cannot copy file bobg: cyclic redundancy error": I tried to copy my pst file before I tried to fix or change anything but at the very end of the copy I get an error "cannot copy file bobg: cyclic redundancy error". I have used Norton disk doctor and PC-Doctor to check the hard disk (NTFS). PC-Doctor reports no errors, Norton reports a couple of indexes that should be deleted. I was surprised that sea...

Text boxes on graphs
How do you make a text box hide the grid lines behind it on a graph? The grid lines are still visible and run through the text box, cluttering it up. Thanks right-click text box choose -- 'Format Text Box' from shortcut menu colors and lines tab change fill color to white Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day :) * Drew wrote: > How do you make a text box hide the grid lines behind it on a graph? The > grid line...

Problems with Outlook.pst
I hope someone can please help, as I am desperate. 1) I am using Outlook mainly to store my address book (ie address, phone numbers emails addresses etc). I now have more than one copy of outlook.pst probably due to transferring data from another machine. I believe that the data contained in each copy is near enough the same with some just a few discrepancies. However, I am not sure which copy has the most up-to-date information since I have managed to open them altogether (see point 2 below) and the "save date" is the same for all the different outlook.pst. Here is my ques...

Multiple Combo Boxes Highlighted
Hi, I have a problem with something in VB6. I have 4 combo boxes with individual names (not an array) located on an SSTab object. When I select another tab and then return to the tab these boxes are located on, each of them appears to be highlighted in blue. I add values to them only when loading the form so I'm at a loss as to why this happens ? Any ideas are greatly appreciated. Thanks, Jen. "Jennifer Ward" <jward@comcast.net> wrote in message news:eq5HrcBrKHA.6064@TK2MSFTNGP02.phx.gbl... > Hi, > > I have a problem with someth...

How to sort using formula?
Does anybody know a trick to sort data using formula? Example: User input: 2,5,1,3,4 Formula result (referring to user input cells): 1,2,3,4,5 Thanks Arie Arie, I'm not sure about what you want but I'll give it a try. Suppose your user entry is in column A1:A5 Select B1:B5 ( B1 will be the highlighted "active" cell) and type =Small(A1:A5,{1,2,3,4,5}). Confirm the formula not with <ENTER> but with <CNTRL>+<SHIFT>+<ENTER>. Tis is called array input of the formula. In cell B1:B5 the figures you gave are now ordered (ascending). I hope this i...

Remote office email problem
Hi, I have a remote office with 2 Windows XP workstation + Outlook 2000. In main office, we have Exchange server 5.5, no OWA. The two offices are connected by VPN devices, the bandwith is 1-3M. The question is: 1. In remote office, what client should I use, Outlook 2000 or OE? which one is more efficient? or using OWA? 2. If using Outlook 2000, which mode should I use? Corporate or Internet mode? If using Corporate mode, should I join the remote 2 PC to our main office Windows 2000 Domain? Thanks for your help. Michael It all depends what you want them to have. If they use OE, they can only...

HELP !! Combo box to feed other combo boxes
Hi, I have a form with a stock list. One field is [Dealer Allocated] so stock can be allocated to a specific dealer - this is a combo box (combo1) for single allocations. I now also want to be able to update this combo box for several records in bulk. I thought I would do this by having a second combo box in the footer of the form which the user selects the dealer from and then clicks a button which looks for first record without dealer allocated and updates the value of combo1 to the value of combo2. This would then be enclosed in a Do Loop for specified number of records. I can...