Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Selection based on a format

Status
Not open for further replies.

wgechter

MIS
Jul 24, 2002
85
US
I am trying to get specific output on a report. The ID #'s that I need are 5 digits with one decimal. Anything else I do not want reported in the report. We have many ID's that have 7 digits, characters, and a combination. It is an 11 digit string field. Does anyone know how I could come up with this output? Thanks,
Wendi
 
Create a formula to capture the 5 digits and 1 decimal.

Like this: mid({your_field}, 1, 6)

Now create a group using this formula.
 
In the recorrd selection formula place something like:

len(trim({Table.ID})) = 5
and
instr({Table.ID},".") > 0

This assumes that the 5 digits are inclusive of the decimal, if not, change the 5 to a 6.

-k kai@informeddatadecisions.com
 
Thanks for all the help. I tried the latter b/c it seemed to be easier to use. If I pull out the instr part it works nicely but currently it's not pulling anything with the instr. I will play with it some more. My programming is not the best. Any other suggestions? Thanks
 
I've got it!! Thanks, I actually had to do len = to 7 b/c of the 5 digits plus one decimal plus one more digit. Thank you very much!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top