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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Len ?

Status
Not open for further replies.

Klo

Technical User
Aug 28, 2002
86
US
I have a simple (or it seems it should be) problem. I have
a table named "Input_data" with a field named "Profiles_1".
I need to know the length of the data in this field for
each record in the table. How can I do this???
Thanks
 
Hi put this SELECT Len([Profiles_1]) AS length
FROM Input_data;
 
OK, I see how that would work. But let me change the scenerio a bit. Let's say that I need to find the length of the data in "Profiles_1" and if it is greater than X then do this, otherwise do this. Then go to the next record and do the same until the end of the records. How would I do that?
Thanks for your help.
 
iif(len([Profiles_1])>x, do this, otherwise do this)

Hope that helps.

Kevin
 
dim mydb as database
set mydb = currentdb
dim rst as database
set rst= mydb.opendatabase("SELECT Len([Profiles_1]) AS lengt FROM Input_data")
do while not rst.eof
Select Case rst!lengt
Case 1
do something
Case 2
do somethingelse
Case ...
..........
End Select

rst.movenext
loop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top