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!

Eliminate Empty Characters from Query

Status
Not open for further replies.

bethabernathy

Programmer
Jul 13, 2001
254
MX
Hi -

I am linking fox pro tables via ODBC into an Access database. One of the fox pro tables has the fields

"first_name"
"last_name"

The data in these fields contain empty blank spaces. So, when I run a query, I will get something like:

"Abernathy " as the results for "last_name". Where "Abernathy " has five blank characters included in the field.

I can't modify the fox pro data, so I am trying to find a way to eliminate the blank spaces in the fields.

Any information would be appreciated.

Thanks, Beth beth@integratedresourcemgmt.com
 
Hi - I figured it out. This is the syntax:

Trim([first_name])
Trim([last_name])

Those variables are added in field section of the query. If you want to combine the fields this is the syntax:

Expr1: Trim([first_name]) & " " & Trim([last_name]) beth@integratedresourcemgmt.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top