How do I sort 1, 2, 3, etc instead of 1, 11, 111 in access

L

Larry Linson

Use a numeric field or variable rather than numeric characters in a text
field. Almost certainly that's the answer.

But, next time, feel free to use the big white space under the subject to
ask your question; this time it seemed obvious, but next time it might be
helpful to know what version of the product you are using, and what the
situation is when you encounter the error (as in this case, when your sort
isn't working as you think it ought).

For other good suggestions on effective use of newsgroups, take a look at
the FAQ at http://www.mvps.org/access/netiquette.htm.

Larry Linson
Microsoft Office Access MVP
 
X

xeoimom

Can't use the field as numeric, there is alphanumeric information in it. If
I change it I lose the alpha. I'm sort building numbers, such as 100, 102A
etc. I need to sort it so it will go 1, 2, 30, 30A, 45, 100, etc. Can you
help?

Thanks
xeoimom
 
J

John Spencer

Try sorting by
VAL(YourField) and then by YourField

By the way, you should be setting up the sorting by using the Reports Sorting
and Grouping dialog (Design View - View: Sorting and Grouping from the menu).

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
X

xeoimom

I am using the Design View:Sorting and Grouping. It is set up on Ascending,
Group on Each Value and Group Interval 1. The name of the field I'm trying
to sort is FacilityNumber. So, following your help, it should be
"VAL(FacilityNumber), FacilityNumber" and where do I input this? I'm sorry,
I don't understand.

Thanks for your help

xeoimom
 
J

John Spencer

Insert
=Val([FacilityNumber]) as the first sort in the dialog and then under it you
would have the current sort
[FacilityNumber]



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
X

xeoimom

I'm sorry, but where do I insert this?

Katherine

John Spencer said:
Insert
=Val([FacilityNumber]) as the first sort in the dialog and then under it you
would have the current sort
[FacilityNumber]



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I am using the Design View:Sorting and Grouping. It is set up on Ascending,
Group on Each Value and Group Interval 1. The name of the field I'm trying
to sort is FacilityNumber. So, following your help, it should be
"VAL(FacilityNumber), FacilityNumber" and where do I input this? I'm sorry,
I don't understand.

Thanks for your help

xeoimom
 
J

John Spencer

Katherine,

I'm sorry, but I don't really know any other way to explain this.

-- Open the report in design view
-- Select View: Grouping and Sorting from the menu
-- Type in the first row
=Val([FacilityNumber])
-- Type in the second row
[FacilityNumber]

If you want grouping then set the grouping parameters as needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I'm sorry, but where do I insert this?

Katherine

John Spencer said:
Insert
=Val([FacilityNumber]) as the first sort in the dialog and then under it you
would have the current sort
[FacilityNumber]



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I am using the Design View:Sorting and Grouping. It is set up on Ascending,
Group on Each Value and Group Interval 1. The name of the field I'm trying
to sort is FacilityNumber. So, following your help, it should be
"VAL(FacilityNumber), FacilityNumber" and where do I input this? I'm sorry,
I don't understand.

Thanks for your help

xeoimom


:

Try sorting by
VAL(YourField) and then by YourField

By the way, you should be setting up the sorting by using the Reports Sorting
and Grouping dialog (Design View - View: Sorting and Grouping from the menu).

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

xeoimom wrote:
Can't use the field as numeric, there is alphanumeric information in it. If
I change it I lose the alpha. I'm sort building numbers, such as 100, 102A
etc. I need to sort it so it will go 1, 2, 30, 30A, 45, 100, etc. Can you
help?

Thanks
xeoimom

:


Use a numeric field or variable rather than numeric characters in a text
field. Almost certainly that's the answer.

But, next time, feel free to use the big white space under the subject to
ask your question; this time it seemed obvious, but next time it might be
helpful to know what version of the product you are using, and what the
situation is when you encounter the error (as in this case, when your sort
isn't working as you think it ought).

For other good suggestions on effective use of newsgroups, take a look at
the FAQ at http://www.mvps.org/access/netiquette.htm.

Larry Linson
Microsoft Office Access MVP
 
X

xeoimom

Awesome, That worked!! Is there a way to make numbered bldg before the
lettered bldg?

xeoimom

John Spencer said:
Katherine,

I'm sorry, but I don't really know any other way to explain this.

-- Open the report in design view
-- Select View: Grouping and Sorting from the menu
-- Type in the first row
=Val([FacilityNumber])
-- Type in the second row
[FacilityNumber]

If you want grouping then set the grouping parameters as needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I'm sorry, but where do I insert this?

Katherine

John Spencer said:
Insert
=Val([FacilityNumber]) as the first sort in the dialog and then under it you
would have the current sort
[FacilityNumber]



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

xeoimom wrote:
I am using the Design View:Sorting and Grouping. It is set up on Ascending,
Group on Each Value and Group Interval 1. The name of the field I'm trying
to sort is FacilityNumber. So, following your help, it should be
"VAL(FacilityNumber), FacilityNumber" and where do I input this? I'm sorry,
I don't understand.

Thanks for your help

xeoimom


:

Try sorting by
VAL(YourField) and then by YourField

By the way, you should be setting up the sorting by using the Reports Sorting
and Grouping dialog (Design View - View: Sorting and Grouping from the menu).

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

xeoimom wrote:
Can't use the field as numeric, there is alphanumeric information in it. If
I change it I lose the alpha. I'm sort building numbers, such as 100, 102A
etc. I need to sort it so it will go 1, 2, 30, 30A, 45, 100, etc. Can you
help?

Thanks
xeoimom

:


Use a numeric field or variable rather than numeric characters in a text
field. Almost certainly that's the answer.

But, next time, feel free to use the big white space under the subject to
ask your question; this time it seemed obvious, but next time it might be
helpful to know what version of the product you are using, and what the
situation is when you encounter the error (as in this case, when your sort
isn't working as you think it ought).

For other good suggestions on effective use of newsgroups, take a look at
the FAQ at http://www.mvps.org/access/netiquette.htm.

Larry Linson
Microsoft Office Access MVP
 
J

John Spencer

I can't think of any easy way to do that. Although, I would think that
would be the result you would see with this sorting.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Awesome, That worked!! Is there a way to make numbered bldg before the
lettered bldg?

xeoimom

John Spencer said:
Katherine,

I'm sorry, but I don't really know any other way to explain this.

-- Open the report in design view
-- Select View: Grouping and Sorting from the menu
-- Type in the first row
=Val([FacilityNumber])
-- Type in the second row
[FacilityNumber]

If you want grouping then set the grouping parameters as needed.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
I'm sorry, but where do I insert this?

Katherine

:

Insert
=Val([FacilityNumber]) as the first sort in the dialog and then under it you
would have the current sort
[FacilityNumber]



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

xeoimom wrote:
I am using the Design View:Sorting and Grouping. It is set up on Ascending,
Group on Each Value and Group Interval 1. The name of the field I'm trying
to sort is FacilityNumber. So, following your help, it should be
"VAL(FacilityNumber), FacilityNumber" and where do I input this? I'm sorry,
I don't understand.

Thanks for your help

xeoimom


:

Try sorting by
VAL(YourField) and then by YourField

By the way, you should be setting up the sorting by using the Reports Sorting
and Grouping dialog (Design View - View: Sorting and Grouping from the menu).

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

xeoimom wrote:
Can't use the field as numeric, there is alphanumeric information in it. If
I change it I lose the alpha. I'm sort building numbers, such as 100, 102A
etc. I need to sort it so it will go 1, 2, 30, 30A, 45, 100, etc. Can you
help?

Thanks
xeoimom

:


Use a numeric field or variable rather than numeric characters in a text
field. Almost certainly that's the answer.

But, next time, feel free to use the big white space under the subject to
ask your question; this time it seemed obvious, but next time it might be
helpful to know what version of the product you are using, and what the
situation is when you encounter the error (as in this case, when your sort
isn't working as you think it ought).

For other good suggestions on effective use of newsgroups, take a look at
the FAQ at http://www.mvps.org/access/netiquette.htm.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top