query record length

  • Thread starter Thread starter Andrew L.
  • Start date Start date
A

Andrew L.

Hope you can help with a basic question from a novice.

I have a text field FORCES with maximum length 50 characters. I want my query to return
those records where the length of text is greater than 30. I set up my query design with
criteria LEN([FORCES])>30

However, when I run the query it always inserts double quotes around the 30, viz:
LEN([FORCES])>"30", and produces completely wrong results. How can I make Access compute
the length of the text data, rather than some meaningless text comparison?

TIA
Andrew L.
 
This shouldn't happen. Do you have a user defined function named LEN? Are
you typing the function as all upper case? Normally when you enter function
names, they will automatically change to the proper capitalization.
 
Hi Andrew,

Does a column in your grid look like this?

Field: LEN([FORCES])
Table:
Sort:
Show:
Criteria: >30

Sorry... the only thing I could think of
was that you might have typed all of "it"
in the Criteria row.

Please respond back if I have misunderstood.

Good luck,

Gary Walter
 
Gary

You are right, I had typed the whole expression in the criteria row. Your version is spot
on.

Thanks, and apologies for bothering you with such elementary stuff!

Andrew

Gary Walter said:
Hi Andrew,

Does a column in your grid look like this?

Field: LEN([FORCES])
Table:
Sort:
Show:
Criteria: >30

Sorry... the only thing I could think of
was that you might have typed all of "it"
in the Criteria row.

Please respond back if I have misunderstood.

Good luck,

Gary Walter

Andrew L. said:
Hope you can help with a basic question from a novice.

I have a text field FORCES with maximum length 50 characters. I want my query to return
those records where the length of text is greater than 30. I set up my query design with
criteria LEN([FORCES])>30

However, when I run the query it always inserts double quotes around the 30, viz:
LEN([FORCES])>"30", and produces completely wrong results. How can I make Access compute
the length of the text data, rather than some meaningless text comparison?

TIA
Andrew L.
 
Back
Top