Trim function in a query

G

Guest

We have the following trim function in a query,

ISSUED BY: Trim([LASTNAME]) & ", " & Trim([FIRSTNAME])

The query is a make table query and the function works correctly. When we
change the query type to select nothing appears in the field.

We changed the field to LASTNAME and the query in the select mode again
worked correctly.

Any input is appreciated.
 
T

Tom Ellison

Dear Tap:

Sounds a bit mysterious. Perhaps something is not functioning well along
the way.

May I suggest splitting the process into little pieces, temporarily, to find
out where it goes bad. Perhaps then we can find what to fix.

Add several columns to the query to diagnose:

LASTNAME
FIRSTNAME
Trim(LASTNAME)
Trim(FIRSTNAME)
Trim(LASTNAME) & ", "
", " & Trim(FIRSTNAME)

When you see each of these in adjacent columns, do you get any suggestion
where it may be malfunctioning?

I suspect perhaps:

- A corruption of the database: Compact and Repair

- A bad or missing reference, corrupted library (Trim function): Test on
another computer.

Tom Ellison
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top