UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Need to sort on first char in field    
 
   
jan0902
post Apr 4 2007, 05:01 AM
Post #1

New Member
Posts: 7
From: Netherlands



Hello,

I'm trying to sort on the first char in a field. The first char is a "D" or a "H" or a "I" or a "O" . So the field contains
D1 till D999 or H1 till H999 and so on.
I made four queries with the Left$([fieldname];1)="D" and changed the "D" to "H".
How can I made this more simple.
The user must get a question to type the required letter? (Now it is done by a submenu)

could you please help me?
Go to the top of the page
 
+
Doug Steele
post Apr 4 2007, 05:13 AM
Post #2

UtterAccess VIP
Posts: 17,643
From: Don Mills, ON (Canada)



I'm confused. Sorting on the entire field will sort on the first character in that field. There's no need to worry about Left.

Do you mean that you want to limit what's displayed, so that you only see those records that start with D, or those records that start with H?

Put a critieria of

LIKE [What Letter?] & "*"

under the field. When the query's run, an input box will prompt the user for the letter they want.
Go to the top of the page
 
+
jan0902
post Apr 4 2007, 12:42 PM
Post #3

New Member
Posts: 7
From: Netherlands



Thanx,

Sorry that I confused you. It was exactly wat I mend (a limited display).
I was thinking to complicated with expr: and didnot use the LIKE correctly.

Thanx, problem solved!

Jan
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 08:52 PM