A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Convert in Integer" for MA or any guru, please!



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2005, 01:29 PM
JohnLute
external usenet poster
 
Posts: n/a
Default "Convert in Integer" for MA or any guru, please!

I previously posted this but thought it would be better to start a new
thread. I'm trying to get my criteria to ascend straight:

Here are the two tables and pertinent fields I need to report:
tblFinishedGoods
txtProfileID (PK)

tblFGUnitLoadLayerParameters
txtProfileID (PK)
txtLayer (PK)

I use sfrmFGUnitLoadLayerParameters to make entries into
tblFGUnitLoadLayerParameters. cbLayer is a value list:
"All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8" ;"9";"10";"11";"12";"13";"14";"15";"16";"17";"18"; "19";"20"

I'd like my report of cbLayer to ascend. This creates the problem of "10"
following "1" as well as "20" following "2":
1
10
2
20
3
4
5

How can I set this up so that the numeric sequence is truly ascending:
1
2
3
4
5
10
20

MA replied:

Convert in Integer
CInt(yourfield)

Can someone please expand on this? I've never dealt with this so it's
unclear. Access help states that conversions from text to numeric can be done
BUT ALL values must be numeric. As you can see, I have text and numeric
stored in the field. Is it possible to achieve true ascending criteria?

THANKS!!!

--
www.Marzetti.com
  #2  
Old May 20th, 2005, 02:18 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

You haven't told us where you would expect to sort All, Even, or Odd.

You can use an expression (or function) in the sorting and grouping levels
rather than a field name. That's why someone suggested you use:
=CInt([txtLayer])

Properly handling the text and numeric values may require a small function.
You could also try an expression like:

=Right(" " & [txtLayer], 4)

--
Duane Hookom
MS Access MVP


"JohnLute" wrote in message
...
I previously posted this but thought it would be better to start a new
thread. I'm trying to get my criteria to ascend straight:

Here are the two tables and pertinent fields I need to report:
tblFinishedGoods
txtProfileID (PK)

tblFGUnitLoadLayerParameters
txtProfileID (PK)
txtLayer (PK)

I use sfrmFGUnitLoadLayerParameters to make entries into
tblFGUnitLoadLayerParameters. cbLayer is a value list:
"All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8" ;"9";"10";"11";"12";"13";"14";"15";"16";"17";"18"; "19";"20"

I'd like my report of cbLayer to ascend. This creates the problem of "10"
following "1" as well as "20" following "2":
1
10
2
20
3
4
5

How can I set this up so that the numeric sequence is truly ascending:
1
2
3
4
5
10
20

MA replied:

Convert in Integer
CInt(yourfield)

Can someone please expand on this? I've never dealt with this so it's
unclear. Access help states that conversions from text to numeric can be
done
BUT ALL values must be numeric. As you can see, I have text and numeric
stored in the field. Is it possible to achieve true ascending criteria?

THANKS!!!

--
www.Marzetti.com



  #3  
Old May 20th, 2005, 03:16 PM
JohnLute
external usenet poster
 
Posts: n/a
Default

Thanks, Duane!

About "All"; "Even"; "Odd" I never thought about where but now that you
mention it - these should appear first.

About the other two codes: I tried them but neither worked. I'm placing them
in the Control Source of the report's field. Have I misunderstood? The one
you supplied returns #Error and the other MA supplied returns all as "0".

THANKS!

--
www.Marzetti.com


"Duane Hookom" wrote:

You haven't told us where you would expect to sort All, Even, or Odd.

You can use an expression (or function) in the sorting and grouping levels
rather than a field name. That's why someone suggested you use:
=CInt([txtLayer])

Properly handling the text and numeric values may require a small function.
You could also try an expression like:

=Right(" " & [txtLayer], 4)

--
Duane Hookom
MS Access MVP


"JohnLute" wrote in message
...
I previously posted this but thought it would be better to start a new
thread. I'm trying to get my criteria to ascend straight:

Here are the two tables and pertinent fields I need to report:
tblFinishedGoods
txtProfileID (PK)

tblFGUnitLoadLayerParameters
txtProfileID (PK)
txtLayer (PK)

I use sfrmFGUnitLoadLayerParameters to make entries into
tblFGUnitLoadLayerParameters. cbLayer is a value list:
"All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8" ;"9";"10";"11";"12";"13";"14";"15";"16";"17";"18"; "19";"20"

I'd like my report of cbLayer to ascend. This creates the problem of "10"
following "1" as well as "20" following "2":
1
10
2
20
3
4
5

How can I set this up so that the numeric sequence is truly ascending:
1
2
3
4
5
10
20

MA replied:

Convert in Integer
CInt(yourfield)

Can someone please expand on this? I've never dealt with this so it's
unclear. Access help states that conversions from text to numeric can be
done
BUT ALL values must be numeric. As you can see, I have text and numeric
stored in the field. Is it possible to achieve true ascending criteria?

THANKS!!!

--
www.Marzetti.com




  #4  
Old May 20th, 2005, 04:12 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

I thought you only wanted to sort the report by this value. You place the
expression
=Right(" " & [txtLayer], 4)
in the sorting and grouping expression/field.

Don't place this as the control source of any text box.

--
Duane Hookom
MS Access MVP
--

"JohnLute" wrote in message
...
Thanks, Duane!

About "All"; "Even"; "Odd" I never thought about where but now that you
mention it - these should appear first.

About the other two codes: I tried them but neither worked. I'm placing
them
in the Control Source of the report's field. Have I misunderstood? The one
you supplied returns #Error and the other MA supplied returns all as "0".

THANKS!

--
www.Marzetti.com


"Duane Hookom" wrote:

You haven't told us where you would expect to sort All, Even, or Odd.

You can use an expression (or function) in the sorting and grouping
levels
rather than a field name. That's why someone suggested you use:
=CInt([txtLayer])

Properly handling the text and numeric values may require a small
function.
You could also try an expression like:

=Right(" " & [txtLayer], 4)

--
Duane Hookom
MS Access MVP


"JohnLute" wrote in message
...
I previously posted this but thought it would be better to start a new
thread. I'm trying to get my criteria to ascend straight:

Here are the two tables and pertinent fields I need to report:
tblFinishedGoods
txtProfileID (PK)

tblFGUnitLoadLayerParameters
txtProfileID (PK)
txtLayer (PK)

I use sfrmFGUnitLoadLayerParameters to make entries into
tblFGUnitLoadLayerParameters. cbLayer is a value list:
"All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8" ;"9";"10";"11";"12";"13";"14";"15";"16";"17";"18"; "19";"20"

I'd like my report of cbLayer to ascend. This creates the problem of
"10"
following "1" as well as "20" following "2":
1
10
2
20
3
4
5

How can I set this up so that the numeric sequence is truly ascending:
1
2
3
4
5
10
20

MA replied:

Convert in Integer
CInt(yourfield)

Can someone please expand on this? I've never dealt with this so it's
unclear. Access help states that conversions from text to numeric can
be
done
BUT ALL values must be numeric. As you can see, I have text and numeric
stored in the field. Is it possible to achieve true ascending criteria?

THANKS!!!

--
www.Marzetti.com






  #5  
Old May 20th, 2005, 07:20 PM
JohnLute
external usenet poster
 
Posts: n/a
Default

That's more clear to me now - I'm a little thick sometimes!

THANKS!!! That does the trick, however, All; Even; Odd appear last in the
ascension. After further thought I don't think this is an issue.

--
www.Marzetti.com


"Duane Hookom" wrote:

I thought you only wanted to sort the report by this value. You place the
expression
=Right(" " & [txtLayer], 4)
in the sorting and grouping expression/field.

Don't place this as the control source of any text box.

--
Duane Hookom
MS Access MVP
--

"JohnLute" wrote in message
...
Thanks, Duane!

About "All"; "Even"; "Odd" I never thought about where but now that you
mention it - these should appear first.

About the other two codes: I tried them but neither worked. I'm placing
them
in the Control Source of the report's field. Have I misunderstood? The one
you supplied returns #Error and the other MA supplied returns all as "0".

THANKS!

--
www.Marzetti.com


"Duane Hookom" wrote:

You haven't told us where you would expect to sort All, Even, or Odd.

You can use an expression (or function) in the sorting and grouping
levels
rather than a field name. That's why someone suggested you use:
=CInt([txtLayer])

Properly handling the text and numeric values may require a small
function.
You could also try an expression like:

=Right(" " & [txtLayer], 4)

--
Duane Hookom
MS Access MVP


"JohnLute" wrote in message
...
I previously posted this but thought it would be better to start a new
thread. I'm trying to get my criteria to ascend straight:

Here are the two tables and pertinent fields I need to report:
tblFinishedGoods
txtProfileID (PK)

tblFGUnitLoadLayerParameters
txtProfileID (PK)
txtLayer (PK)

I use sfrmFGUnitLoadLayerParameters to make entries into
tblFGUnitLoadLayerParameters. cbLayer is a value list:
"All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8" ;"9";"10";"11";"12";"13";"14";"15";"16";"17";"18"; "19";"20"

I'd like my report of cbLayer to ascend. This creates the problem of
"10"
following "1" as well as "20" following "2":
1
10
2
20
3
4
5

How can I set this up so that the numeric sequence is truly ascending:
1
2
3
4
5
10
20

MA replied:

Convert in Integer
CInt(yourfield)

Can someone please expand on this? I've never dealt with this so it's
unclear. Access help states that conversions from text to numeric can
be
done
BUT ALL values must be numeric. As you can see, I have text and numeric
stored in the field. Is it possible to achieve true ascending criteria?

THANKS!!!

--
www.Marzetti.com






  #6  
Old May 27th, 2005, 02:49 PM
MA
external usenet poster
 
Posts: n/a
Default

JohnLute wrote:
I previously posted this but thought it would be better to start a new
thread. I'm trying to get my criteria to ascend straight:

Here are the two tables and pertinent fields I need to report:
tblFinishedGoods
txtProfileID (PK)

tblFGUnitLoadLayerParameters
txtProfileID (PK)
txtLayer (PK)

I use sfrmFGUnitLoadLayerParameters to make entries into
tblFGUnitLoadLayerParameters. cbLayer is a value list:

"All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8" ;"9";"10";"11";"12";"13";"
14";"15";"16";"17";"18";"19";"20"

IIf(isNumeric(tblFGUnitLoadLayerParameters);cint(t blFGUnitLoadLayerParameter
s);tblFGUnitLoadLayerParameters)



I'd like my report of cbLayer to ascend. This creates the problem of
"10" following "1" as well as "20" following "2":
1
10
2
20
3
4
5

How can I set this up so that the numeric sequence is truly ascending:
1
2
3
4
5
10
20

MA replied:

Convert in Integer
CInt(yourfield)

Can someone please expand on this? I've never dealt with this so it's
unclear. Access help states that conversions from text to numeric can
be done BUT ALL values must be numeric. As you can see, I have text
and numeric stored in the field. Is it possible to achieve true
ascending criteria?

THANKS!!!


--
_ _
Ciao
MAssimiliano Amendola www.accessgroup.it
Cisa1 - I° Conferenza Italiana per Sviluppatori Access Arezzo 4+5
Giugno 2005 Sono aperte le iscrizioni Info: www.donkarl.com/it


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CONVERT Function Disappered in Excel Gord Dibben General Discussion 3 April 13th, 2005 07:59 PM
Forms Sizing mbox204 Using Forms 4 October 10th, 2004 02:04 PM
Conversion of excel vba code to access vba filnigeria General Discussion 5 July 15th, 2004 02:23 AM
Activechart.SetSourceMethod Jon Peltier Charts and Charting 1 March 1st, 2004 03:21 PM
Formating MONTH() integer Dan Worksheet Functions 14 February 23rd, 2004 12:12 AM


All times are GMT +1. The time now is 09:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.